[Bug ld/3307] bad relocation section name `'
--- Additional Comments From hjl at lucon dot org 2006-10-06 12:25 --- Your SPTest.o is bad. I can't reproduce your bad SPTest.o with gcc-4.1.1-1.fc5 binutils-2.16.91.0.6-5 on FC5. Can you provide your SPTest.s? -- What|Removed |Added CC||hjl at lucon dot org http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From jmbnyc at gmail dot com 2006-10-06 13:21 --- Subject: Re: bad relocation section name `' I'll run again and upload what you ask for. However, I upgraded binutils so I can only give you something for 2.17 (but I get the same behavior with both so it should not matter). /JMB On 6 Oct 2006 12:25:48 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > > --- Additional Comments From hjl at lucon dot org 2006-10-06 12:25 > --- > Your SPTest.o is bad. I can't reproduce your bad SPTest.o with > > gcc-4.1.1-1.fc5 > binutils-2.16.91.0.6-5 > > on FC5. Can you provide your SPTest.s? > > > -- >What|Removed |Added > > CC||hjl at lucon dot org > > > http://sourceware.org/bugzilla/show_bug.cgi?id=3307 > > --- You are receiving this mail because: --- > You reported the bug, or are watching the reporter. > You are on the CC list for the bug, or are watching someone who is. > -- http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3314] New: ELF linker aligns empty section
When we are outputing an empty loadable section, we consider it not loadable. But we still align it at page boundary: [EMAIL PROTECTED] empty-10]$ !cat cat foo.c extern char *__init_array_start; int xxx = 10; _start () { return __init_array_start != 0; } [EMAIL PROTECTED] empty-10]$ make LD=ld gcc-c -o foo.o foo.c ld -o foo foo.o readelf -Sl foo There are 9 section headers, starting at offset 0x2001b0: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0 0 0 [ 1] .text PROGBITS 004000e8 00e8 0016 AX 0 0 4 [ 2] .eh_frame PROGBITS 00400100 0100 0038 A 0 0 8 [ 3] .init_array INIT_ARRAY 00600138 00200138 WA 0 0 1 [ 4] .data PROGBITS 00600138 0138 0004 WA 0 0 4 [ 5] .comment PROGBITS 00200138 002d 0 0 1 [ 6] .shstrtab STRTAB 00200165 0046 0 0 1 [ 7] .symtab SYMTAB 002003f0 0138 0018 8 8 8 [ 8] .strtab STRTAB 00200528 003d 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) Elf file type is EXEC (Executable file) Entry point 0x4000e8 There are 3 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSizMemSiz Flags Align LOAD 0x 0x0040 0x0040 0x0138 0x0138 R E20 LOAD 0x0138 0x00600138 0x00600138 0x0004 0x0004 RW 20 GNU_STACK 0x 0x 0x 0x 0x RW 8 Section to Segment mapping: Segment Sections... 00 .text .eh_frame 01 .data 02 [EMAIL PROTECTED] empty-10]$ -- Summary: ELF linker aligns empty section Product: binutils Version: 2.18 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: hjl at lucon dot org CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=3314 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3314] ELF linker aligns empty section
--- Additional Comments From hjl at lucon dot org 2006-10-06 13:41 --- The patch is at http://sourceware.org/ml/binutils/2006-10/msg00043.html -- http://sourceware.org/bugzilla/show_bug.cgi?id=3314 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From jmbnyc at gmail dot com 2006-10-06 13:42 --- Created an attachment (id=1353) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1353&action=view) updated tar gzip with requested SPTest.s Here is the requested SPTest.s. I also redid everything and redid the README file to show exactly what I did to reproduce the problem. In addition, I included rpm info for gcc and binutils. -- What|Removed |Added Attachment #1347 is|0 |1 obsolete|| http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/3315] New: ld --gc-sections *.o produces big(ger than possible) executables
Basically, I compile an executable from same set of source files. First I compile .c modules into .o with -ffunction-sections -fdata-sections, and then I can do something a-la "gcc -o executable -Wl,--gc-sections *.o" or I can bundle almost all .o files into lib.a using ar and do "gcc -o executable -Wl,--gc-sections main.o lib.a" The second method gives much better results: # size */busybox textdata bss dec hex filename 14186 868 24 150783ae6 busybox.1.t/busybox 2682 304 243010 bc2 busybox.2.t/busybox However, there is no reason to believe that all is good now. I tent to fear than suboptimal link-time dead code elimination is still happening, only on lesser scale (within each individual .o file pulled from lib.a, not over whole set of .o files). Extended explanation is at http://busybox.net/~vda/Kbuild_new_2006/ I will attach objdump -xsdr of both executables. comparing those, I see: * extra EH_FRAME section * sections .hash, .dynstr, .dynsym, are much longer Unstripped executables also available for comparison at the above URL. One thing has been tracked down to this test case: /* Compile: ** gcc -ffunction-sections -fdata-sections -c -o test.o test.c ** gcc -o test -Wl,--gc-sections test.o ** ** First call to notexist() is optimized away by linker because ** function eliminated() is, er, eliminated by section GC. ** ** But second call to notexist() is not optimized away, ** despite the fact that getpwnam_r() is not called from anywhere. ** Then linking fails because notexist() isn't exist. ** ** Renaming getpwnam_r to any other name "fixes" this! */ void notexist(void); int main(void) { return 0; } void eliminated(void) { notexist(); } void getpwnam_r(void) { notexist(); } // HERE Rest are not researched in depth. -- Summary: ld --gc-sections *.o produces big(ger than possible) executables Product: binutils Version: 2.17 Status: NEW Severity: normal Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: vda dot linux at googlemail dot com CC: bug-binutils at gnu dot org GCC build triplet: i386-pc-linux-gnu GCC host triplet: i386-pc-linux-gnu GCC target triplet: i386-pc-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=3315 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/3315] ld --gc-sections *.o produces big(ger than possible) executables
--- Additional Comments From vda dot linux at googlemail dot com 2006-10-06 15:48 --- Created an attachment (id=1354) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1354&action=view) objdump of ld *.o result -- http://sourceware.org/bugzilla/show_bug.cgi?id=3315 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/3315] ld --gc-sections *.o produces big(ger than possible) executables
--- Additional Comments From vda dot linux at googlemail dot com 2006-10-06 15:49 --- Created an attachment (id=1355) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1355&action=view) objdump of ld main.o lib.a result -- http://sourceware.org/bugzilla/show_bug.cgi?id=3315 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3314] ELF linker aligns empty section
--- Additional Comments From hjl at lucon dot org 2006-10-06 16:20 --- The updated patch is at http://sourceware.org/ml/binutils/2006-10/msg00045.html -- http://sourceware.org/bugzilla/show_bug.cgi?id=3314 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From hjl at lucon dot org 2006-10-06 16:30 --- I created a good SPTest.o from your SPTest.s with as in binutils-2.16.91.0.6-5. I can only assume that something is wrong with your OS/hardware. Please assemble it on a different machine. -- What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From jmbnyc at gmail dot com 2006-10-06 16:38 --- Subject: Re: bad relocation section name `' Can you send me the command line that you used to create SPTest.o. /JMB On 6 Oct 2006 16:30:59 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > > --- Additional Comments From hjl at lucon dot org 2006-10-06 16:30 > --- > I created a good SPTest.o from your SPTest.s with as in > binutils-2.16.91.0.6-5. I can only assume that something is > wrong with your OS/hardware. Please assemble it on a different > machine. > > -- >What|Removed |Added > > Status|NEW |RESOLVED > Resolution||WORKSFORME > > > http://sourceware.org/bugzilla/show_bug.cgi?id=3307 > > --- You are receiving this mail because: --- > You reported the bug, or are watching the reporter. > You are on the CC list for the bug, or are watching someone who is. > -- http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From hjl at lucon dot org 2006-10-06 17:05 --- I used "/usr/bin/as -o SPTest.o SPTest.s". -- http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From jmbnyc at gmail dot com 2006-10-06 17:17 --- Subject: Re: bad relocation section name `' I just executed your command line and produced a file that is one byte different than what I sent. Not sure what is wrong with my environment as this is stock latest FC5 with newest binutils (the latest FC5 one had the same issue). The only thing that I can think of is that my computer is Intel Core Duo 2 which was only released in September (I built this machine in mid September). Any suggestions for what I could look for in my environment that could cause this type of problem. /JMB On 6 Oct 2006 17:05:59 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > > --- Additional Comments From hjl at lucon dot org 2006-10-06 17:05 > --- > I used "/usr/bin/as -o SPTest.o SPTest.s". > > -- > > > http://sourceware.org/bugzilla/show_bug.cgi?id=3307 > > --- You are receiving this mail because: --- > You reported the bug, or are watching the reporter. > You are on the CC list for the bug, or are watching someone who is. > -- http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From hjl at lucon dot org 2006-10-06 17:52 --- What did # gcc -v -c SPTest.s say? -- http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From jmbnyc at gmail dot com 2006-10-06 17:57 --- Subject: Re: bad relocation section name `' [EMAIL PROTECTED] bugs]$ gcc -v -c SPTest.s Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) as -V -Qy -o SPTest.o SPTest.s GNU assembler version 2.17.50.0.3-6 (x86_64-redhat-linux) using BFD version 2.17.50.0.3-6 20060715 On 6 Oct 2006 17:52:26 -, hjl at lucon dot org <[EMAIL PROTECTED]> wrote: > > --- Additional Comments From hjl at lucon dot org 2006-10-06 17:52 > --- > What did > > # gcc -v -c SPTest.s > > say? > > -- > > > http://sourceware.org/bugzilla/show_bug.cgi?id=3307 > > --- You are receiving this mail because: --- > You reported the bug, or are watching the reporter. > You are on the CC list for the bug, or are watching someone who is. > -- http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/3307] bad relocation section name `'
--- Additional Comments From hjl at lucon dot org 2006-10-06 18:05 --- Are you saying SPTest.o generated by "gcc -c" is different from "/usr/bin/as -o"? Can you compare SPTest.o generated by # /usr/bin/as -V -Qy -o SPTest.o SPTest.s # /usr/bin/as -o SPTest.o SPTest.s # as -V -Qy -o SPTest.o SPTest.s and tell me which ones are good/bad? -- http://sourceware.org/bugzilla/show_bug.cgi?id=3307 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils