[Bug gold/13023] gold misinterprets dot assignments in sections
http://sourceware.org/bugzilla/show_bug.cgi?id=13023 Arkadiusz Miskiewicz changed: What|Removed |Added CC||arekm at maven dot pl -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13023] gold misinterprets dot assignments in sections
http://sourceware.org/bugzilla/show_bug.cgi?id=13023 --- Comment #3 from Andy Lutomirski 2011-07-23 19:04:28 UTC --- This is a little bit gross but appears to produce the expected result on ld.bfd and gold: SECTIONS { .test 0x1000 : { __workaround = .; *(.a) . = __workaround + 0x10; *(.b); } } -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13023] gold misinterprets dot assignments in sections
http://sourceware.org/bugzilla/show_bug.cgi?id=13023 Octoploid changed: What|Removed |Added CC||cryptooctoploid at gmail ||dot com -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13019] "error: load segment overlap" when linking Linux kernel
http://sourceware.org/bugzilla/show_bug.cgi?id=13019 --- Comment #4 from Andy Lutomirski 2011-07-23 18:50:49 UTC --- (In reply to comment #3) > (In reply to comment #2) > > What is the change to the linker script that causes this to happen? > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9fd67b4ed0714ab718f1f9bd14c344af336a6df7 > > The segment overlap error is correct and I'll fix it in the linker script. > The > dot error looks like a bug. > > This construct in SECTIONS is the problem, I think: > > .vsyscall { > *(.vsyscall_0) > > . = 1024; > *(.vsyscall_1) > } > > AFAICT the bfd linker thinks that assignments to . inside a section are > section-relative but gold thinks they're absolute. The documentation > reference > is escaping me at the moment. I filed bug 13023 for the dot problem. I'm not convinced that the segment overlap is a real bug as opposed to gold just being a little stricter than the bfd linker. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13023] gold misinterprets dot assignments in sections
http://sourceware.org/bugzilla/show_bug.cgi?id=13023 --- Comment #2 from Andy Lutomirski 2011-07-23 18:49:53 UTC --- To reproduce, save 'part 1' as foo.c and 'part 2' as foo.lds. Then do: $ gcc -c foo.c $ ld.gold -o foo2.o -T foo.lds foo.o ld.gold: error: dot may not move backward or $ ld.bfd -o foo2.o -T foo.lds foo.o [works fine] Alternatively, change the dot assignment to: . = 0x1010; and watch gold put the symbol b in the wrong place. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13023] gold misinterprets dot assignments in sections
http://sourceware.org/bugzilla/show_bug.cgi?id=13023 --- Comment #1 from Andy Lutomirski 2011-07-23 18:48:13 UTC --- Created attachment 5859 --> http://sourceware.org/bugzilla/attachment.cgi?id=5859 Test case, part 2 -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13023] New: gold misinterprets dot assignments in sections
http://sourceware.org/bugzilla/show_bug.cgi?id=13023 Summary: gold misinterprets dot assignments in sections Product: binutils Version: 2.21 Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: l...@mit.edu Created attachment 5858 --> http://sourceware.org/bugzilla/attachment.cgi?id=5858 Test case, part 1 Gold seems to think that numbers assigned to '.' inside of an output section are absolute. They should be relative. Small test case attached. This breaks the Linux kernel build as of this change: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9fd67b4ed0714ab718f1f9bd14c344af336a6df7 -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13019] "error: load segment overlap" when linking Linux kernel
http://sourceware.org/bugzilla/show_bug.cgi?id=13019 --- Comment #3 from Andy Lutomirski 2011-07-23 17:42:24 UTC --- (In reply to comment #2) > What is the change to the linker script that causes this to happen? http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9fd67b4ed0714ab718f1f9bd14c344af336a6df7 The segment overlap error is correct and I'll fix it in the linker script. The dot error looks like a bug. This construct in SECTIONS is the problem, I think: .vsyscall { *(.vsyscall_0) . = 1024; *(.vsyscall_1) } AFAICT the bfd linker thinks that assignments to . inside a section are section-relative but gold thinks they're absolute. The documentation reference is escaping me at the moment. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13019] "error: load segment overlap" when linking Linux kernel
http://sourceware.org/bugzilla/show_bug.cgi?id=13019 --- Comment #2 from Ian Lance Taylor 2011-07-23 17:33:43 UTC --- What is the change to the linker script that causes this to happen? -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13019] "error: load segment overlap" when linking Linux kernel
http://sourceware.org/bugzilla/show_bug.cgi?id=13019 Andy Lutomirski changed: What|Removed |Added CC||luto at mit dot edu --- Comment #1 from Andy Lutomirski 2011-07-23 17:14:52 UTC --- (I'm the author of the kernel patch that triggered this.) It looks like two phdrs do indeed overlap. The fix to the linker script is trivial. The errors "ld: error: dot may not move backward" are still there, though. It would be nice if gold (or ld.bfd, for that matter) would give some context for the error... -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/12494] Relaxation leads to wrong code optimization (computed goto)
http://sourceware.org/bugzilla/show_bug.cgi?id=12494 Georg-Johann Lay changed: What|Removed |Added CC||bjoern.m.haase at web dot ||de -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13019] "error: load segment overlap" when linking Linux kernel
http://sourceware.org/bugzilla/show_bug.cgi?id=13019 Arkadiusz Miskiewicz changed: What|Removed |Added CC||arekm at maven dot pl -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13019] New: "error: load segment overlap" when linking Linux kernel
http://sourceware.org/bugzilla/show_bug.cgi?id=13019 Summary: "error: load segment overlap" when linking Linux kernel Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: cryptooctopl...@gmail.com Created attachment 5857 --> http://sourceware.org/bugzilla/attachment.cgi?id=5857 output of "readelf -lSW ./vmlinux" When I try to build the latest kernel git tree with gold I get this error: ld -m elf_x86_64 --build-id -o vmlinux -T arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/head.o arch/x86/kernel/init_task.o init/built-in.o --start-group usr/built-in.o arch/x86/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a arch/x86/lib/lib.a lib/built-in.o arch/x86/lib/built-in.o drivers/built-in.o sound/built-in.o firmware/built-in.o arch/x86/pci/built-in.o arch/x86/video/built-in.o net/built-in.o --end-group .tmp_kallsyms2.o ld: error: dot may not move backward ld: error: dot may not move backward ld: error: load segment overlap [0x180 -> 0x18940e0] and [0x1893000 -> 0x1893c10] ld.bfd links without any problems. The output of "readelf -lSW ./vmlinux" is attached. Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x20 0x8100 0x0100 0x7d1000 0x7d1000 R E 0x20 LOAD 0xa0 0x8180 0x0180 0x0940e0 0x0940e0 RW 0x20 LOAD 0xc0 0xff60 0x01893000 0x001000 0x001000 R E 0x20 LOAD 0xe0 0x 0x01895000 0x012500 0x012500 RW 0x20 LOAD 0xea8000 0x818a8000 0x018a8000 0x085000 0x152000 RWE 0x20 NOTE 0x71bb34 0x8151bb34 0x0151bb34 0x24 0x24 0x4 -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils