* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not

exclude empty .got sections.
This commit is contained in:
Richard Henderson
2011-04-12 23:23:02 +00:00
parent 88597d3422
commit 6452a567da
6 changed files with 32 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2011-04-12 Richard Henderson <rth@redhat.com>
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
exclude empty .got sections.
2011-04-11 H.J. Lu <hongjiu.lu@intel.com> 2011-04-11 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound

View File

@ -2927,6 +2927,7 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
linker does that before adjust_dynamic_symbol is called, and linker does that before adjust_dynamic_symbol is called, and
it is that function which decides whether anything needs to it is that function which decides whether anything needs to
go into these sections. */ go into these sections. */
if (!CONST_STRNEQ (name, ".got"))
s->flags |= SEC_EXCLUDE; s->flags |= SEC_EXCLUDE;
} }
else if ((s->flags & SEC_HAS_CONTENTS) != 0) else if ((s->flags & SEC_HAS_CONTENTS) != 0)

View File

@ -1,3 +1,8 @@
2011-04-12 Richard Henderson <rth@redhat.com>
* ld-alpha/emptygot.s, ld-alpha/emptygot.nm: New test.
* ld-alpha/alpha.exp: Run it.
2011-04-11 Mark Wielaard <mjw@redhat.com> 2011-04-11 Mark Wielaard <mjw@redhat.com>
PR 10549 PR 10549

View File

@ -54,6 +54,11 @@ set alphatests {
{{readelf -WSsrl tlsbinr.rd} {objdump -drj.text tlsbinr.dd} {{readelf -WSsrl tlsbinr.rd} {objdump -drj.text tlsbinr.dd}
{objdump -sj.got tlsbinr.sd}} {objdump -sj.got tlsbinr.sd}}
"tlsbinr"} "tlsbinr"}
{"empty got"
"-melf64alpha" ""
{emptygot.s}
{{nm "-n" emptygot.nm}}
"emptygot"}
} }
# Not implemented yet # Not implemented yet

View File

@ -0,0 +1,5 @@
00000001200000b0 T _start
00000001200100b8 A __bss_start
00000001200100b8 A _edata
00000001200100b8 s foo
00000001200100c0 A _end

View File

@ -0,0 +1,7 @@
.text
.globl _start
_start:
lda $0, foo($29) !gprel
.section .sbss
foo: .quad 0