This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ld in binutils-1.9l.3


> 
> 
> This is a weird problem that `ld' should really detect and prevent
> (via a warning message).
> 
> To reproduce:
> 
> $ cat > test.c
> main () { printf("this is a test\n"); }
> ^D
> $ gcc -o test.o test.c		(Note the missing "-c")
> $ file test.o
> test.o: Linux/i386 demand-paged executable (QMAGIC) not stripped
> $ gcc -o test test.o
> $ file test
> test: Linux/i386 demand-paged executable (QMAGIC) not stripped
> $ test.o
> this is a test
> $ test
> [ no output ]
> 
> When this snuck up on us for real, it caused lots of problems and took
> a bit of debugging to track down a bad Makefile.
> 
> Sometimes, they'll (twice linked binaries) run peacefully, but
> sometimes they do bad things: seg. fault (untraceable) and suck up all
> virtual memory are the two I've seen.
> 
> Could some better magic detection be put into ld?
> 
> - Dan
> 

That is also true for the gas2 snapshot.

-- 
H.J. Lu
NYNEX Science and Technology, Inc.			hjl@nynexst.com