diff options
author | Doug Kwan <dougkwan@google.com> | 2012-03-19 23:54:07 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2012-03-19 23:54:07 +0000 |
commit | 647f15745ab30d29fbcd8fb56ffba69f8b545886 (patch) | |
tree | b0e4404eda01fbb8bb1c625a0b9171708c05fb63 /gold/testsuite | |
parent | e918b09c1c4dd627527cbc0ab429ecdef16d3545 (diff) | |
download | fsf-binutils-gdb-647f15745ab30d29fbcd8fb56ffba69f8b545886.zip fsf-binutils-gdb-647f15745ab30d29fbcd8fb56ffba69f8b545886.tar.gz fsf-binutils-gdb-647f15745ab30d29fbcd8fb56ffba69f8b545886.tar.bz2 |
2012-03-19 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::do_define_standard_symbols): New method.
(Target_arm::do_finalize_sections): Remove code which defines
__exidx_start and __exidx_end. Make symbol table parameter
anonymous as it is not used.
* gold.cc (queue_middle_tasks): Call target hook to define any
target-specific symbols.
* target.h (Target::define_standard_symbols): New method.
(Target::do_define_standard_symbols): Same.
* testsuite/Makefile.am (arm_exidx_test): Dump relocations also.
* testsuite/Makefile.in: Regenerate.
* testsuite/arm_exidx.s: Generate data relocations for __exidx_start
and __exidx_end.
* testsuite/arm_exidx_test.sh: Check that no unused dynamic
relocations are generated for __exidx_start and __exidx_end.
Diffstat (limited to 'gold/testsuite')
-rw-r--r-- | gold/testsuite/Makefile.am | 2 | ||||
-rw-r--r-- | gold/testsuite/Makefile.in | 2 | ||||
-rw-r--r-- | gold/testsuite/arm_exidx_test.s | 6 | ||||
-rwxr-xr-x | gold/testsuite/arm_exidx_test.sh | 19 |
4 files changed, 25 insertions, 4 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index a14dd3e..a7fd06d 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -2505,7 +2505,7 @@ check_SCRIPTS += arm_exidx_test.sh check_DATA += arm_exidx_test.stdout arm_exidx_test.stdout: arm_exidx_test.so - $(TEST_READELF) -S $< > $@ + $(TEST_READELF) -Sr $< > $@ arm_exidx_test.so: arm_exidx_test.o ../ld-new ../ld-new -shared -o $@ $< diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in index 7379071..251bdce 100644 --- a/gold/testsuite/Makefile.in +++ b/gold/testsuite/Makefile.in @@ -5463,7 +5463,7 @@ uninstall-am: @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $< @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_exidx_test.stdout: arm_exidx_test.so -@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_READELF) -S $< > $@ +@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_READELF) -Sr $< > $@ @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_exidx_test.so: arm_exidx_test.o ../ld-new @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new -shared -o $@ $< diff --git a/gold/testsuite/arm_exidx_test.s b/gold/testsuite/arm_exidx_test.s index 14dcc94..8e550e4 100644 --- a/gold/testsuite/arm_exidx_test.s +++ b/gold/testsuite/arm_exidx_test.s @@ -23,3 +23,9 @@ empty: .fnend .size empty, .-empty +# Check that no dynamic relocations for __exidx_start and __exidx_stop +# generated. + .data + .align 12 + .word __exidx_start(got) + .word __exidx_end(got) diff --git a/gold/testsuite/arm_exidx_test.sh b/gold/testsuite/arm_exidx_test.sh index f732a68..e196f12 100755 --- a/gold/testsuite/arm_exidx_test.sh +++ b/gold/testsuite/arm_exidx_test.sh @@ -29,10 +29,23 @@ check() { if ! grep -q "$2" "$1" then - echo "Did not find section header in $1:" + echo "Did not find expected output in $1:" echo " $2" echo "" - echo "Actual headers below:" + echo "Actual output below:" + cat "$1" + exit 1 + fi +} + +check_not() +{ + if grep -q "$2" "$1" + then + echo "Found unexpected output in $1:" + echo " $2" + echo "" + echo "Actual output below:" cat "$1" exit 1 fi @@ -41,5 +54,7 @@ check() # Check that SHF_LINK_ORDER is set. check arm_exidx_test.stdout ".* .ARM.exidx .* ARM_EXIDX .* AL .*" check arm_exidx_test.stdout ".* .ARM.extab .* PROGBITS .* A .*" +check_not arm_exidx_test.stdout ".* .* R_ARM_GLOB_DAT .* __exidx_start" +check_not arm_exidx_test.stdout ".* .* R_ARM_GLOB_DAT .* __exidx_end" exit 0 |