diff options
author | Alan Modra <amodra@gmail.com> | 2018-08-20 19:36:05 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-08-21 14:59:53 +0930 |
commit | 487096bf0bd5499b1d23ecbe5fd64f9f0079c0b5 (patch) | |
tree | 7fdf2a12c1919c5f5a8fdb2d08f8ac58b366e381 /bfd/reloc.c | |
parent | 08a8fe2ffd9766877a74a52922b4391d37e85491 (diff) | |
download | gdb-487096bf0bd5499b1d23ecbe5fd64f9f0079c0b5.zip gdb-487096bf0bd5499b1d23ecbe5fd64f9f0079c0b5.tar.gz gdb-487096bf0bd5499b1d23ecbe5fd64f9f0079c0b5.tar.bz2 |
Delete NEWHOWTO and tidy some uses of reloc_howto_struct
NEWHOWTO was promised way back in 1991 (git commit e5683622186).
I doubt it's ever going to be implemented. This patch removes it,
and tidies some reloc howtos. I was going to make some changes to
reloc_howto_struct, so I think it's important that all relocs howtos
are initialized with HOWTO.
* reloc.c (HOWTO): Revise comment.
(NEWHOWTO, HOWTO_PREPARE): Delete.
* coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
reloc_howto_struct with reloc_howto_type.
* ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
* vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
* elf-hppa.h (HOW): Define.
(elf_hppa_howto_table): Use it to simplify this table, correcting
name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
R_PARISC_LTOFF_FPTR16DF.
* elf32-mep.c (MEPREL): Use HOWTO.
* bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/reloc.c')
-rw-r--r-- | bfd/reloc.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/bfd/reloc.c b/bfd/reloc.c index aaf3a80..ec58a7e 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -372,46 +372,19 @@ FUNCTION The HOWTO Macro DESCRIPTION - The HOWTO define is horrible and will go away. + The HOWTO macro fills in a reloc_howto_type (a typedef for + const struct reloc_howto_struct). .#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ . { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } DESCRIPTION - And will be replaced with the totally magic way. But for the - moment, we are compatible, so do it this way. - -.#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ -. HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ -. NAME, FALSE, 0, 0, IN) -. - -DESCRIPTION This is used to fill in an empty howto entry in an array. .#define EMPTY_HOWTO(C) \ . HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ . NULL, FALSE, 0, 0, FALSE) . - -DESCRIPTION - Helper routine to turn a symbol into a relocation value. - -.#define HOWTO_PREPARE(relocation, symbol) \ -. { \ -. if (symbol != NULL) \ -. { \ -. if (bfd_is_com_section (symbol->section)) \ -. { \ -. relocation = 0; \ -. } \ -. else \ -. { \ -. relocation = symbol->value; \ -. } \ -. } \ -. } -. */ /* |