diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-04-20 17:10:55 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-20 17:11:04 -0700 |
commit | 5ce03cea78d4d8bf00e29e4dfa4952d53f3b1064 (patch) | |
tree | 0bdfc4dd8ffda9077c60ddc5a176c46936da0147 /bfd/elflink.c | |
parent | fbf05aa70d7a6ad3dd92ca718faa4bb383b975ee (diff) | |
download | gdb-5ce03cea78d4d8bf00e29e4dfa4952d53f3b1064.zip gdb-5ce03cea78d4d8bf00e29e4dfa4952d53f3b1064.tar.gz gdb-5ce03cea78d4d8bf00e29e4dfa4952d53f3b1064.tar.bz2 |
Don't check relocations in excluded sections
When checking relocations after gc-sections has run, the unused sections
have been removed. Don't check relocations in excluded sections.
* elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
in excluded sections
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 5af334a..b432384 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -3518,7 +3518,9 @@ _bfd_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) Elf_Internal_Rela *internal_relocs; bfd_boolean ok; + /* Don't check relocations in excluded sections. */ if ((o->flags & SEC_RELOC) == 0 + || (o->flags & SEC_EXCLUDE) != 0 || o->reloc_count == 0 || ((info->strip == strip_all || info->strip == strip_debugger) && (o->flags & SEC_DEBUGGING) != 0) |