diff options
author | Cupertino Miranda <cmiranda@synopsys.com> | 2016-10-24 12:52:04 +0200 |
---|---|---|
committer | Cupertino Miranda <cmiranda@synopsys.com> | 2017-06-08 19:00:34 +0200 |
commit | 9d5c718b7a9c46132940f899f40556a77ca462a0 (patch) | |
tree | ea749d9adb39c618b93d128bf7a93a04227f7bec /bfd/elf32-arc.c | |
parent | be9e3704f91190c1e1c5d253494423b13c982d93 (diff) | |
download | gdb-9d5c718b7a9c46132940f899f40556a77ca462a0.zip gdb-9d5c718b7a9c46132940f899f40556a77ca462a0.tar.gz gdb-9d5c718b7a9c46132940f899f40556a77ca462a0.tar.bz2 |
[ARC] Disable warning on absolute relocs when symbol is local.
R_ARC_32 and R_ARC_32_ME cannot be generated as dynamic relocs.
However, a warning message and check_relocs was aborting when this type of
reloc was being resolved to a local symbol.
This is wrong as local symbols are resolvable at link time.
bfd/ChangeLog:
Cupertino Miranda <cmiranda@synopsys.com>
* elf32-arc.c (elf_arc_check_relocs): Added condition to disable
warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
Diffstat (limited to 'bfd/elf32-arc.c')
-rw-r--r-- | bfd/elf32-arc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index 747faf9..8aec9ea 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -1938,7 +1938,8 @@ elf_arc_check_relocs (bfd * abfd, and the dynamic linker can not resolve these. However the error should not occur for e.g. debugging or non-readonly sections. */ - if ((bfd_link_dll (info) && !bfd_link_pie (info)) + if (h != NULL + && (bfd_link_dll (info) && !bfd_link_pie (info)) && (sec->flags & SEC_ALLOC) != 0 && (sec->flags & SEC_READONLY) != 0 && ((sec->flags & SEC_CODE) != 0 |