Browse Source
PR ld/15365
* layout.cc (Layout::finalize): Make __ehdr_start STV_HIDDEN.
ld/
PR ld/15365
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Restrict __ehdr_start's export class to no less than STV_HIDDEN.
ld/testsuite/
PR ld/15365
* ld-elf/ehdr_start.d: Expect __ehdr_start to be STB_LOCAL.
* ld-mips-elf/ehdr_start-1.nd: New test.
* ld-mips-elf/ehdr_start-2.nd: New test.
* ld-mips-elf/ehdr_start-1.ld: New test linker script.
* ld-mips-elf/ehdr_start-2.ld: New test linker script.
* ld-mips-elf/ehdr_start-new.s: New test source.
* ld-mips-elf/ehdr_start-o32.s: New test source.
* ld-mips-elf/mips-elf.exp: Run the new tests.
binutils-2_24-branch
13 changed files with 111 additions and 2 deletions
@ -0,0 +1,9 @@ |
|||
ENTRY (__start) |
|||
SECTIONS |
|||
{ |
|||
. = 0x12300000 + SIZEOF_HEADERS; |
|||
.text : { *(.text) } |
|||
. = 0x23400000; |
|||
HIDDEN (_gp = ALIGN (16) + 0x7ff0); |
|||
.got : { *(.got) } |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
Symbol table '\.symtab' contains [0-9]+ entries: |
|||
#... |
|||
*[0-9]+: 0*12300000 +0 (?:NOTYPE|OBJECT) +LOCAL +DEFAULT +[0-9]+ __ehdr_start |
|||
#pass |
|||
@ -0,0 +1,10 @@ |
|||
ENTRY (__start) |
|||
SECTIONS |
|||
{ |
|||
. = 0x12300000 + SIZEOF_HEADERS; |
|||
.text : { *(.text) } |
|||
. = 0x23400000; |
|||
__ehdr_start = .; |
|||
HIDDEN (_gp = ALIGN (16) + 0x7ff0); |
|||
.got : { *(.got) } |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
Symbol table '\.symtab' contains [0-9]+ entries: |
|||
#... |
|||
*[0-9]+: 0*23400000 +0 (?:NOTYPE|OBJECT) +LOCAL +DEFAULT +[0-9]+ __ehdr_start |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
.abicalls |
|||
.text |
|||
.weak __ehdr_start |
|||
.globl __start |
|||
.ent __start |
|||
.frame $29, 0, $31 |
|||
.mask 0x00000000, 0 |
|||
__start: |
|||
.cplocal $2 |
|||
.cpsetup $t9, $zero, __start |
|||
lw $2, __ehdr_start |
|||
jr $31 |
|||
.end __start |
|||
@ -0,0 +1,14 @@ |
|||
.abicalls |
|||
.text |
|||
.weak __ehdr_start |
|||
.globl __start |
|||
.ent __start |
|||
.frame $29, 0, $31 |
|||
.mask 0x00000000, 0 |
|||
__start: |
|||
.set noreorder |
|||
.cpload $25 |
|||
.set reorder |
|||
lw $2, __ehdr_start |
|||
jr $31 |
|||
.end __start |
|||
Loading…
Reference in new issue