* Re: gdb
[not found] <richard@atheist.tamu.edu>
@ 1996-05-09 14:55 ` Eric Youngdale
1996-10-29 18:50 ` thanks to Richard : Xemacs compiled as ELF Zarmfab Software Development
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Eric Youngdale @ 1996-05-09 14:55 UTC (permalink / raw)
>Well, that's obviously not true.. You said it yourself: the linker _does_
>need to know about it, so the assembler is wrong.
If you assume the linker doesn't remove any code, then I don't
see how the linker would need to know about local branches.
>Now, I don't want to be the linker who tries to find local labels in the
>above. Maybe the data values happen to have patterns that match a "bsr"
>instruction, and then the linker "fixes" it because there is some jsr we
>optimized somewhere.. Uggh..
>
>So, making the linker fix things up is not only hard as h*ll, it's
>actually impossible.
No, it isn't impossible - this is getting close to the sort of
thing I get paid to do in my day job, and I know it can be done given
enough care and persistance. I will agree that it is damn hard, however.
One thing I could suggest however is that if the compiler is
absolutely 100% strict about only putting executable code into the .text
segment, then the problem becomes significantly easier. I would say
that it is even doable. The question is how easy it would be to impose
this restriction. On some architectures, it is not terribly complicated,
but on others it imposes a significant hardship.
If it is not possible to eliminate the use of non-executable
code from the .text segment, then it would be possible to add special
relocations to mark those regions of non-executable code in the text
segment, so the linker still knows to do the right thing.
>So, now think of the problem without a fixed assembler.. What do we get?
We
>get an assembler that isn't a "traditional" assembler any more: we just get
>a smart pre-processor. Essentially, the assembler shouldn't emit runnable
>code, it should emit runnable code _fragments_, and then the linker would
be >free to pad those as it sees fit. You said the hpux setup did something
that
>sounded like this (and take a look at the currently fastest single-CPU
>machine - it's not made by Digital. It's the HP PA-8000, so they have done
>some things _right_, and the compiler is probably one of those things
>even though the memory subsystem seems to be quite good).
I agree, they have done some things right. The older
32 bit versions had some very strange features which must have driven
the compiler and linker people crazy. Things like how their address space
is divided into 4 1Gb quadrants - it is very expensive to call from one
quadrant to another, especially when floating point is involved, so they
added some hacks which basically allow certain functions to be performed
without branching outside of the quadrant. With the 8000 series machine,
they now have a 64 bit machine, and I am told that some of this stupidity
goes away. The compiler people from HP that I have spoken to seem to get
rather excited about no longer having to worry about this sort of crap :-).
I have been told in all seriousness by people from HP that you should
consider static linking programs for optimum performance (basically to
avoid the overhead of branching to another quadrant - the executable
is normally in quadrant 0, and shared libs are in quadrant 1 or 2 depending
upon whether the debugger is in use or not). Anyways, let me explain some
of the things they have done in their compilers and related tools.
If you compile a program with the highest optimziation (+O4) under
SoftBench, the compiler itself doesn't actually generate any code. It
generates an internal representation of the parse tree, and it isn't
easy for me to tell whether much in the way of optimization has been done
at this point.
When you go to link such a file, the linker itself collects all of
the intermediate code that is supposed to go into the output image, and
invokes the code generator (the same one the compiler invokes if lower
levels of optimization are selected). The code generator is able to do all
of the
proper optimizations in order to optimize the *entire* image. I have
been told by people from HP that there are limits to how large a program
you can link in this manner - as you might imagine the VM usage can get
rather impressively large.
Anyways, to sum up, I think this is still a tractible problem for
the linker to handle completely without any help from the assembler
(other than some special relocation types to indicate non-executable code
in the .text section). It is highly academic at this point anyways, since
I have much more important things I need to be hacking right now anyways.
I guess we are still looking for that elusive volunteer :-).
-Eric
--
"The woods are lovely, dark and deep. But I have promises to keep,
And lines to code before I sleep, And lines to code before I sleep."
^ permalink raw reply [flat|nested] 9+ messages in thread
* thanks to Richard : Xemacs compiled as ELF
[not found] <richard@atheist.tamu.edu>
1996-05-09 14:55 ` gdb Eric Youngdale
@ 1996-10-29 18:50 ` Zarmfab Software Development
1996-11-15 13:28 ` glibc snapshot 961111 binaries Zarmfab Software Development
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Zarmfab Software Development @ 1996-10-29 18:50 UTC (permalink / raw)
with many help from Richard Henderson i just installed Xemacs 19.14
at my Avanti running Redhat 4.0 as ELF,
many thanks , Richard
--
Martin Cornelius, ZARMFAB software development, University of Bremen
phone: 49-421-218-4807 FAX: 49-421-218-3889
email: fabsoft@zarm.uni-bremen.de
paper-mail: Hochschulring / Am Fallturm, 28359 BREMEN, Germany
--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: glibc snapshot 961111 binaries
[not found] <richard@atheist.tamu.edu>
1996-05-09 14:55 ` gdb Eric Youngdale
1996-10-29 18:50 ` thanks to Richard : Xemacs compiled as ELF Zarmfab Software Development
@ 1996-11-15 13:28 ` Zarmfab Software Development
1996-11-18 13:30 ` PLEASE HELP glibc 961111 : can't execute libm - linked programs Zarmfab Software Development
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Zarmfab Software Development @ 1996-11-15 13:28 UTC (permalink / raw)
On Nov 14, 10:02pm, Richard Henderson wrote:
> ps. Recently I've been told that atheist isn't always friendly
> with anon ftp, so someone probably ought to mirror this.
Well, that's true.
I'd ! promise ! to mirror the library at fabsoft.zarm.uni-bremen.de, if i
only could get it.
Couldn't you send it to me by mail, Richard ?
--
Martin Cornelius, ZARMFAB software development, University of Bremen
phone: 49-421-218-4807 FAX: 49-421-218-3889
email: fabsoft@zarm.uni-bremen.de
paper-mail: Hochschulring / Am Fallturm, 28359 BREMEN, Germany
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* PLEASE HELP glibc 961111 : can't execute libm - linked programs
[not found] <richard@atheist.tamu.edu>
` (2 preceding siblings ...)
1996-11-15 13:28 ` glibc snapshot 961111 binaries Zarmfab Software Development
@ 1996-11-18 13:30 ` Zarmfab Software Development
1996-11-19 11:12 ` Miquel van Smoorenburg
1996-11-26 19:15 ` binutils fun Bryan W. Headley
1997-02-17 19:47 ` fclose() Bryan W. Headley
5 siblings, 1 reply; 9+ messages in thread
From: Zarmfab Software Development @ 1996-11-18 13:30 UTC (permalink / raw)
after installing glibc961111 executing any program linked with libm
results in:
<xxx>: error in loading shared libraries
/lib/libm.so.6: undefined symbol: EDOM
can anybody help me with this ?
--
Martin Cornelius, ZARMFAB software development, University of Bremen
phone: 49-421-218-4807 FAX: 49-421-218-3889
email: fabsoft@zarm.uni-bremen.de
paper-mail: Hochschulring / Am Fallturm, 28359 BREMEN, Germany
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PLEASE HELP glibc 961111 : can't execute libm - linked programs
1996-11-18 13:30 ` PLEASE HELP glibc 961111 : can't execute libm - linked programs Zarmfab Software Development
@ 1996-11-19 11:12 ` Miquel van Smoorenburg
0 siblings, 0 replies; 9+ messages in thread
From: Miquel van Smoorenburg @ 1996-11-19 11:12 UTC (permalink / raw)
You (Zarmfab Software Development) wrote:
> after installing glibc961111 executing any program linked with libm
> results in:
>
> <xxx>: error in loading shared libraries
> /lib/libm.so.6: undefined symbol: EDOM
>
> can anybody help me with this ?
It's because sysdeps/alpha/w_sqrt.S misses a #define __need_Emath
before it includes <errnos.h>. With the standard Linux 2.0.x header
files, EDOM doesn't get defined then.
Wouldn't it be better to change errnos.h so that it does a
#ifndef EMON
#define EDOM ...
.. instead of having the app/lib having to define __need_Emath ?
I don't know if this was fixed after 961114, because I can't reach
alpha.gnu.ai.mit.edu
Mike.
--
Miquel van | Cistron Internet Services -- Alphen aan den Rijn.
Smoorenburg, | mailto:info@cistron.nl http://www.cistron.nl/
miquels@cistron.nl | Our vision is to speed up time, eventually eliminating it.
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: binutils fun
1996-11-26 19:15 ` binutils fun Bryan W. Headley
@ 1996-11-26 18:54 ` Richard Henderson
0 siblings, 0 replies; 9+ messages in thread
From: Richard Henderson @ 1996-11-26 18:54 UTC (permalink / raw)
> Has the bug with objcopy moving from ECOFF to ELF been fixed?
No, and such a thing is very low priority. It is a non-trivial
transformation as you have to undo the brain damage inherent in
ECOFF's handling of the GP and the .lita.
> Secondary issue (actually, not), is that compiling "sudo" as a
> static binary yields assert errors in elf.c/libbfd in ld. The
> same damned assert errors that objcopy enjoys.
Those assertion failures turn out to be harmless -- your sudo should
still work -- but that has been fixed in any case for some time.
Which brings me to another point. Would those of you that have
gotten "LITERAL relocation truncated" messages while linking large
binaries contact me privately? I've now got a linker that can
handle multiple .got subsections and before I unleash it on the
world I'd like to try it out on some non-trivial examples.
r~
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* binutils fun
[not found] <richard@atheist.tamu.edu>
` (3 preceding siblings ...)
1996-11-18 13:30 ` PLEASE HELP glibc 961111 : can't execute libm - linked programs Zarmfab Software Development
@ 1996-11-26 19:15 ` Bryan W. Headley
1996-11-26 18:54 ` Richard Henderson
1997-02-17 19:47 ` fclose() Bryan W. Headley
5 siblings, 1 reply; 9+ messages in thread
From: Bryan W. Headley @ 1996-11-26 19:15 UTC (permalink / raw)
Rich,
Has the bug with objcopy moving from ECOFF to ELF been fixed? Secondary issue
(actually, not), is that compiling "sudo" as a static binary yields assert
errors in elf.c/libbfd in ld. The same damned assert errors that objcopy
enjoys... Will pull in more details as needed.
BTW, thanks for the glibc snapshot. Getting /usr/include straighten out between
elfBall, 3.0.3, 4.0, etc. really helps!
Bryan
--
Bryan W. Headley Home: bheadley@interaccess.com
211 East Pineview Drive Office: bwh@abnamro.com
Round Lake Park, IL 60073 Phone: 847 740-1446
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: fclose()
[not found] <richard@atheist.tamu.edu>
` (4 preceding siblings ...)
1996-11-26 19:15 ` binutils fun Bryan W. Headley
@ 1997-02-17 19:47 ` Bryan W. Headley
1997-02-17 20:04 ` fclose() Richard Henderson
5 siblings, 1 reply; 9+ messages in thread
From: Bryan W. Headley @ 1997-02-17 19:47 UTC (permalink / raw)
On Feb 17, 1:01pm, Richard Henderson wrote:
> Subject: Re: fclose()
> > fclose(fchan); /* works */
> > fclose(fchan); /* segfaults */
>
> Yep. malloc doen't like it when you free the same pointer twice.
>
> > Ok, so Who's in charge of this code, so I relay my findings?
>
> Me, I guess. This is a known occurrence. The bug, though,
> is with the program trying to fclose twice. The solution of
> course is not to do that.
>
Sometimes you can control that, sometimes you can't. Stupid example:
let's say that I, overly-conscientious guy, fclose stdin and stdout
and then do an exit(). It's exit's job to close all opened file handles,
and naturally it should try to close stdin/stdout. Should exit segv or
exit gracefully? The latter. Especially since fclose() should return
error code in rather than segv'ing.
In professional world, I've seen far too many programs that close all
handles at termination, regardless of whether if known that handle is
open or not. It WOULD be nice to legislate good programming, I agree...
But legacy code rules, especially when practice is "sort of" backed up by API
specs.
--
Bryan W. Headley Home: bheadley@interaccess.com
211 East Pineview Drive Office: bwh@abnamro.com
Round Lake Park, IL 60073 Phone: 847 740-1446
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: fclose()
1997-02-17 19:47 ` fclose() Bryan W. Headley
@ 1997-02-17 20:04 ` Richard Henderson
0 siblings, 0 replies; 9+ messages in thread
From: Richard Henderson @ 1997-02-17 20:04 UTC (permalink / raw)
> In professional world, I've seen far too many programs that close all
> handles at termination, regardless of whether if known that handle is
> open or not. It WOULD be nice to legislate good programming, I agree...
*sigh* Well, there is a solution when you can't fix the source
and that is use a different malloc that can handle multiple frees.
This can be done by either explicitly linking with one when you are
in control of such things or using LD_PRELOAD when you aren't.
But the vast majority of the programs run under Linux *can* have
their sources fixed, and most often it's just a silly little thing
that only takes a few minutes, and so we should.
> But legacy code rules, especially when practice is "sort of" backed up
> by API specs.
There is no API spec that allows "fclose(foo); fclose(foo);".
As always, the effect is undefined/unpredictable.
r~
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~1997-02-17 20:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <richard@atheist.tamu.edu>
1996-05-09 14:55 ` gdb Eric Youngdale
1996-10-29 18:50 ` thanks to Richard : Xemacs compiled as ELF Zarmfab Software Development
1996-11-15 13:28 ` glibc snapshot 961111 binaries Zarmfab Software Development
1996-11-18 13:30 ` PLEASE HELP glibc 961111 : can't execute libm - linked programs Zarmfab Software Development
1996-11-19 11:12 ` Miquel van Smoorenburg
1996-11-26 19:15 ` binutils fun Bryan W. Headley
1996-11-26 18:54 ` Richard Henderson
1997-02-17 19:47 ` fclose() Bryan W. Headley
1997-02-17 20:04 ` fclose() Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox