If there is an ELF input section which isn't one of those special ELF section, the output section attribute may be set incorrectly.
Created attachment 714 [details] A testcase I got bash-3.00$ make LD=ld as -o foo.o foo.s ld -shared -o foo.so foo.o readelf -S foo.so | grep note | awk '{print $3, $4;}' > so.out readelf -S foo.o | grep note | awk '{print $3, $4;}' > o.out diff -up so.out o.out --- so.out 2005-10-16 10:36:50.000000000 -0700 +++ o.out 2005-10-16 10:36:50.000000000 -0700 @@ -1 +1 @@ -note PROGBITS +note NOTE make: *** [all] Error 1
*** Bug 1508 has been marked as a duplicate of this bug. ***
A patch is posted at http://sourceware.org/ml/binutils/2005-10/msg00284.html
Subject: Re: ELF input section may not be handled properly > A patch is posted at > > http://sourceware.org/ml/binutils/2005-10/msg00284.html I hit this error: gcc -DHAVE_CONFIG_H -I. -I../../src/bfd -I. -I. -I../../src/bfd -I../../src/bfd/ ../include -I../../src/bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmiss ing-prototypes -Werror -g -O1 -c ../../src/bfd/libbfd.c -o libbfd.o cc1: warnings being treated as errors ../../src/bfd/libbfd.c:1052: warning: no previous prototype for '_bfd_generic_in it_private_section_data' Dave
You need to run "make headers" in bfd to update header files.
Subject: Re: ELF input section may not be handled properly > You need to run "make headers" in bfd to update header files. Ok, but the patch doesn't apply anymore. Dave
Subject: Re: ELF input section may not be handled properly > > You need to run "make headers" in bfd to update header files. > > Ok, but the patch doesn't apply anymore. Sorry, html garbage in the patch. The patch fixes binutils/1507 and ld/1508. Probably, it will fix ld/1509. Dave
*** Bug 1507 has been marked as a duplicate of this bug. ***
*** Bug 1509 has been marked as a duplicate of this bug. ***
Fixed.