[Bug binutils/12048] New: Set Large address aware flag using objcopy
Some ld PE flags like --large-address-aware, --dynamicbase, --forceinteg, --nxcompat etc are not replicated in objcopy. -- Summary: Set Large address aware flag using objcopy Product: binutils Version: 2.21 (HEAD) Status: NEW Severity: enhancement Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: jon_y at users dot sourceforge dot net CC: bug-binutils at gnu dot org GCC target triplet: *-*-mingw* http://sourceware.org/bugzilla/show_bug.cgi?id=12048 --- 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/11812] Unused .got.plt section generated by linker
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2010-07-14 00:31 --- Subject: Bug 11812 CVSROOT:/cvs/src Module name:src Changes by: h...@sourceware.org 2010-07-14 00:30:58 Modified files: bfd: ChangeLog elf32-i386.c elf64-x86-64.c ld/testsuite : ChangeLog ld/testsuite/ld-elf: exclude3b.d ld/testsuite/ld-i386: i386.exp ld/testsuite/ld-x86-64: x86-64.exp Added files: ld/testsuite/ld-elf: exclude3d.d ld/testsuite/ld-i386: nogot1.d nogot1.s ld/testsuite/ld-x86-64: nogot1.d nogot1.s Log message: Don't allocate .got.plt section if there are no GOT nor PLT entries. bfd/ 2010-07-13 H.J. Lu PR ld/11812 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't allocate .got.plt section if there are no GOT nor PLT entries. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise. ld/testsuite/ 2010-07-13 H.J. Lu PR ld/11812 * ld-elf/exclude3b.d: Don't run on ia64-*-*. Replace .got with .dynamic. * ld-elf/exclude3d.d: New. * ld-i386/nogot1.d: Likewise. * ld-i386/nogot1.s: Likewise. * ld-x86-64/nogot1.d: Likewise. * ld-x86-64/nogot1.s: Likewise. * ld-i386/i386.exp: Run nogot1. * ld-x86-64/x86-64.exp: Likewise. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5072&r2=1.5073 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-i386.c.diff?cvsroot=src&r1=1.235&r2=1.236 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf64-x86-64.c.diff?cvsroot=src&r1=1.196&r2=1.197 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1261&r2=1.1262 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/exclude3d.d.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/exclude3b.d.diff?cvsroot=src&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-i386/nogot1.d.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-i386/nogot1.s.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-i386/i386.exp.diff?cvsroot=src&r1=1.29&r2=1.30 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-x86-64/nogot1.d.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-x86-64/nogot1.s.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-x86-64/x86-64.exp.diff?cvsroot=src&r1=1.16&r2=1.17 --- Additional Comments From drow at sources dot redhat dot com 2010-09-22 23:54 --- H.J., this patch broke one of our applications. It uses the address of _DYNAMIC, which is stored in .got.plt, to relocate itself. It finds that location by referencing _GLOBAL_OFFSET_TABLE_; after your patch, _G_O_T_ is still defined, but it is SHN_ABS with value zero. This works on every platform except x86. Is this change really useful? -- http://sourceware.org/bugzilla/show_bug.cgi?id=11812 --- 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/11812] Unused .got.plt section generated by linker
--- Additional Comments From hjl dot tools at gmail dot com 2010-09-23 00:01 --- (In reply to comment #2) > H.J., this patch broke one of our applications. It uses the address of > _DYNAMIC, which is stored in .got.plt, to relocate itself. It finds that > location by referencing _GLOBAL_OFFSET_TABLE_; after your patch, _G_O_T_ is > still defined, but it is SHN_ABS with value zero. This works on every > platform > except x86. > Can you provide a small testcase? -- http://sourceware.org/bugzilla/show_bug.cgi?id=11812 --- 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/11812] Unused .got.plt section generated by linker
--- Additional Comments From drow at sources dot redhat dot com 2010-09-23 00:37 --- Here's a minimal version that demonstrates the wrong value. .text .globl _start _start: leaq _DYNAMIC(%rip), %rsi movq _GLOBAL_OFFSET_TABLE_(%rip), %rcx subq %rcx, %rsi .globl breakpoint breakpoint: movq $60, %rax movq %rsi, %rdi andq $63, %rdi syscall .size _start,.-_start The exit code should be zero (load address 64-byte aligned). But actually I get 9. You might get zero, but check %rsi at *breakpoint. -- What|Removed |Added CC||drow at sources dot redhat ||dot com http://sourceware.org/bugzilla/show_bug.cgi?id=11812 --- 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/11812] Unused .got.plt section generated by linker
--- Additional Comments From hjl dot tools at gmail dot com 2010-09-23 04:02 --- (In reply to comment #4) > Here's a minimal version that demonstrates the wrong value. > > .text > .globl _start > _start: > leaq _DYNAMIC(%rip), %rsi > movq _GLOBAL_OFFSET_TABLE_(%rip), %rcx > subq %rcx, %rsi > .globl breakpoint > breakpoint: > movq $60, %rax > movq %rsi, %rdi > andq $63, %rdi > syscall > .size _start,.-_start > > The exit code should be zero (load address 64-byte aligned). But actually I > get > 9. You might get zero, but check %rsi at *breakpoint. > Does this work if there are no GOT/PLT sections at all? -- http://sourceware.org/bugzilla/show_bug.cgi?id=11812 --- 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