aboutsummaryrefslogtreecommitdiff
path: root/gold/reloc.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-03-04 06:46:27 +0000
committerIan Lance Taylor <ian@airs.com>2009-03-04 06:46:27 +0000
commit031cdbed18938f96e4607b717e864928bbb4643e (patch)
tree73d294fac4e833a02f6a523a953083822cad402b /gold/reloc.cc
parent727fc41e077139570ea8b8ddfd6c546b2a55627c (diff)
downloadbinutils-031cdbed18938f96e4607b717e864928bbb4643e.zip
binutils-031cdbed18938f96e4607b717e864928bbb4643e.tar.gz
binutils-031cdbed18938f96e4607b717e864928bbb4643e.tar.bz2
PR 9918
* target-reloc.h (relocate_section): Pass output_section to relocate. * i386.cc (Target_i386::should_apply_static_reloc): Add output_section parameter. Change all callers. (Target_i386::Relocate::relocate): Add output_section parameter. * x86_64.cc (Target_x86_64::Relocate::relocate): Likewise. * sparc.cc (Target_sparc::Relocate::relocate): Likewise. * powerpc.cc (Target_powerpc::Relocate::relocate): Likewise. * testsuite/two_file_shared.sh: New script. * testsuite/Makefile.am (check_SCRIPTS): Add two_file_shared.sh. (check_DATA): Add two_file_shared.dbg. (two_file_shared.dbg): New target. * testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/reloc.cc')
-rw-r--r--gold/reloc.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/reloc.cc b/gold/reloc.cc
index 669d87b..b6394a5 100644
--- a/gold/reloc.cc
+++ b/gold/reloc.cc
@@ -279,7 +279,9 @@ Sized_relobj<size, big_endian>::do_read_relocs(Read_relocs_data* rd)
// PLT sections. Relocations for sections which are not
// allocated (typically debugging sections) should not add new
// GOT and PLT entries. So we skip them unless this is a
- // relocatable link or we need to emit relocations.
+ // relocatable link or we need to emit relocations. FIXME: What
+ // should we do if a linker script maps a section with SHF_ALLOC
+ // clear to a section with SHF_ALLOC set?
typename This::Shdr secshdr(pshdrs + shndx * This::shdr_size);
bool is_section_allocated = ((secshdr.get_sh_flags() & elfcpp::SHF_ALLOC)
!= 0);