Browse Source
bfd/ 2010-08-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11913 * elf32-i386.c (elf_i386_finish_dynamic_sections): Check if .got.plt section is discarded. * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise. ld/testsuite/ 2010-08-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11913 * ld-i386/discarded1.d: New. * ld-i386/discarded1.s: Likewise. * ld-i386/discarded1.t: Likewise. * ld-x86-64/discarded1.d: Likewise. * ld-x86-64/discarded1.s: Likewise. * ld-x86-64/discarded1.t: Likewise. * ld-i386/i386.exp: Run discarded1. * ld-x86-64/x86-64.exp: Likewise.binutils-2_21-branch
12 changed files with 82 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||
#as: --32 |
|||
#ld: -melf_i386 -T discarded1.t |
|||
#error: .*discarded output section: `.got.plt' |
|||
@ -0,0 +1,13 @@ |
|||
.text |
|||
.globl _start |
|||
.type _start, @function |
|||
_start: |
|||
movl x@GOT(%ecx), %eax |
|||
.size _start, .-_start |
|||
.globl x |
|||
.data |
|||
.align 4 |
|||
.type x, @object |
|||
.size x, 4 |
|||
x: |
|||
.long 2 |
|||
@ -0,0 +1,7 @@ |
|||
ENTRY(_start) |
|||
SECTIONS |
|||
{ |
|||
.text : {*(.text)} |
|||
.data : {*(.data)} |
|||
/DISCARD/ : {*(*)} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
#as: --64 |
|||
#ld: -melf_x86_64 -T discarded1.t |
|||
#error: .*discarded output section: `.got.plt' |
|||
@ -0,0 +1,13 @@ |
|||
.text |
|||
.globl _start |
|||
.type _start, @function |
|||
_start: |
|||
movq x@GOTPCREL(%rip), %rax |
|||
.size _start, .-_start |
|||
.globl x |
|||
.data |
|||
.align 4 |
|||
.type x, @object |
|||
.size x, 4 |
|||
x: |
|||
.long 2 |
|||
@ -0,0 +1,7 @@ |
|||
ENTRY(_start) |
|||
SECTIONS |
|||
{ |
|||
.text : {*(.text)} |
|||
.data : {*(.data)} |
|||
/DISCARD/ : {*(*)} |
|||
} |
|||
Loading…
Reference in new issue