diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2017-05-10 18:40:04 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2017-05-10 18:45:30 +0200 |
commit | 2318686590bd252a47f494554dfc11bc18a3e58b (patch) | |
tree | b49da0594fba01d2d6f4ffff99f3030b52c0d176 /bfd/bfd-in2.h | |
parent | aab82f4c201a2612c0fb6d5b66d8e4ce2f036f1c (diff) | |
download | gdb-2318686590bd252a47f494554dfc11bc18a3e58b.zip gdb-2318686590bd252a47f494554dfc11bc18a3e58b.tar.gz gdb-2318686590bd252a47f494554dfc11bc18a3e58b.tar.bz2 |
bfd: new BFD target entry point _bfd_set_reloc.
This patch adds a new entry point to the BFD_JUMP_TABLE_RELOCS. The
previous common implementation `bfd_set_reloc', in bfd/bfd.c, has been
moved to bfd/reloc.c with the name `_bfd_generic_set_reloc', and all
BFD targets has been adapted to use it.
This patch doesn't introduce any change on functionality, but prepares
the ground for further work.
bfd/ChangeLog:
2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
* targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
(struct bfd_target): New field _bfd_set_reloc.
* bfd.c (bfd_set_reloc): Call backend _set_bfd.
* reloc.c (_bfd_generic_set_reloc): New function.
* coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
* nlm-target.h (nlm_set_reloc): Likewise.
* coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
* aout-tic30.c (MY_set_reloc): Likewise.
* aout-target.h (MY_set_reloc): Likewise.
* elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
* coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
* mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
* vms-alpha.c (alpha_vms_set_reloc): Likewise.
* aout-adobe.c (aout_32_set_reloc): Likewise.
* bout.c (b_out_set_reloc): Likewise.
* coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
* i386os9k.c (aout_32_set_reloc): Likewise.
* ieee.c (ieee_set_reloc): Likewise.
* oasys.c (oasys_set_reloc): Likewise.
* som.c (som_set_reloc): Likewise.
* versados.c (versados_set_reloc): Likewise.
* coff64-rs6000.c (rs6000_xcoff64_vec): Add
_bfd_generic_set_reloc.
(rs6000_xcoff64_aix_vec): LIkewise.
* libbfd.c (_bfd_norelocs_set_reloc): New function.
* libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
* i386msdos.c (msdos_set_reloc): Define to
_bfd_norelocs_set_reloc.
* elfcode.h (elf_set_reloc): Define.
* bfd-in2.h: Regenerated.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 17a35c0..8617881 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -7075,6 +7075,8 @@ long bfd_canonicalize_reloc void bfd_set_reloc (bfd *abfd, asection *sec, arelent **rel, unsigned int count); +#define bfd_set_reloc(abfd, asect, location, count) \ + BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); @@ -7542,12 +7544,15 @@ typedef struct bfd_target #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ + NAME##_set_reloc, \ NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, struct bfd_symbol **); + void (*_bfd_set_reloc) + (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); |