diff options
author | Nick Clifton <nickc@redhat.com> | 2017-10-12 13:38:20 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-10-12 13:38:20 +0100 |
commit | 1d75a8e26e6def4f492c84a5f678e41ddebda799 (patch) | |
tree | 6267e270216389a3d3aa3ee8ab114ea7cdcb3c4e /bfd/bfd-in2.h | |
parent | 9f8575350f980aa6da8c488c6aa30862620eaa1f (diff) | |
download | gdb-1d75a8e26e6def4f492c84a5f678e41ddebda799.zip gdb-1d75a8e26e6def4f492c84a5f678e41ddebda799.tar.gz gdb-1d75a8e26e6def4f492c84a5f678e41ddebda799.tar.bz2 |
Force the AArch64 linker backend to refuse to link when it encounters unresoleable relocations.
* reloc.c (enum bfd_reloc_status): Start values at 2.
* bfd-in2.h: Regenerate.
* elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
that a TRUE return indicates success. Compare the result of
calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
(build_one_stub): Change sense of tests against aarch64_relocate
return value.
(elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
than FALSE, when an error is detected.
(elfNN_aarch64_final_link_relocate): Likewise.
* testsuite/ld-aarch64/pcrel_pic_defined.d: Expect errors not
warnings. Expect errors about unsupported relocations.
* testsuite/ld-aarch64/pcrel_pic_undefined.d: Likewise.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 4ba05b1..8265efa 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -2466,8 +2466,9 @@ unsigned int bfd_arch_mach_octets_per_byte typedef enum bfd_reloc_status { - /* No errors detected. */ - bfd_reloc_ok, + /* No errors detected. Note - the value 2 is used so that it + will not be mistaken for the boolean TRUE or FALSE values. */ + bfd_reloc_ok = 2, /* The relocation was performed, but there was an overflow. */ bfd_reloc_overflow, |