From c02d11a585398734a2178d65a17411cd3050b9d2 Mon Sep 17 00:00:00 2001 From: Cupertino Miranda Date: Fri, 22 Jul 2016 15:10:31 +0100 Subject: Fix segfault in ARC linker when generating got entries for local symbols. bfd * arc-got.h (relocate_fix_got_relocs_for_got_info): Handle the case where there's no elf_link_hash_entry while processing GOT_NORMAL got entries. ld * testsuite/ld-arc/got-01.d: New file. * testsuite/ld-arc/got-01.s: New file. --- ld/testsuite/ld-arc/got-01.d | 7 +++++++ ld/testsuite/ld-arc/got-01.s | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 ld/testsuite/ld-arc/got-01.d create mode 100644 ld/testsuite/ld-arc/got-01.s (limited to 'ld/testsuite/ld-arc') diff --git a/ld/testsuite/ld-arc/got-01.d b/ld/testsuite/ld-arc/got-01.d new file mode 100644 index 0000000..c34d6a7 --- /dev/null +++ b/ld/testsuite/ld-arc/got-01.d @@ -0,0 +1,7 @@ +#source: got-01.s +#as: -mcpu=arc700 +#ld: +#readelf: -S + +There are . section headers, starting at offset 0x[0-9a-f]+: +#... diff --git a/ld/testsuite/ld-arc/got-01.s b/ld/testsuite/ld-arc/got-01.s new file mode 100644 index 0000000..4e1b406 --- /dev/null +++ b/ld/testsuite/ld-arc/got-01.s @@ -0,0 +1,5 @@ + .text + .global __start +__start: +foo: + ld r0, [pcl, foo@gotpc] -- cgit v1.1