summaryrefslogtreecommitdiff
path: root/bfd/elf32-hppa.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r--bfd/elf32-hppa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index be0727f46b..0c5e2154eb 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3739,6 +3739,11 @@ elf32_hppa_relocate_section (bfd *output_bfd,
&& sym_sec->output_section != NULL
&& ! bfd_is_abs_section (sym_sec))
{
+ /* Skip this relocation if the output section has
+ been discarded. */
+ if (bfd_is_abs_section (sym_sec->output_section))
+ break;
+
indx = elf_section_data (sym_sec->output_section)->dynindx;
/* We are turning this relocation into one
against a section symbol, so subtract out the