aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elf64-sparc.c4
-rw-r--r--bfd/reloc.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index fb4483d..c6d0d3e 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -322,6 +322,10 @@ elf64_sparc_set_reloc (bfd *abfd ATTRIBUTE_UNUSED,
{
asect->orelocation = location;
canon_reloc_count (asect) = count;
+ if (count != 0)
+ asect->flags |= SEC_RELOC;
+ else
+ asect->flags &= ~SEC_RELOC;
}
/* Write out the relocs. */
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 89b6f7f..6446acc 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -8706,6 +8706,10 @@ _bfd_generic_set_reloc (bfd *abfd ATTRIBUTE_UNUSED,
{
section->orelocation = relptr;
section->reloc_count = count;
+ if (count != 0)
+ section->flags |= SEC_RELOC;
+ else
+ section->flags &= ~SEC_RELOC;
}
/*