[binutils-gdb] METAG_RELOC_AGAINST_DISCARDED_SECTION
Alan Modra
amodra@sourceware.org
Fri Jul 18 00:55:30 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=71931bcce1b8bbc64bdf47055c6c6021d9199d7a
commit 71931bcce1b8bbc64bdf47055c6c6021d9199d7a
Author: Alan Modra <amodra@gmail.com>
Date: Fri Jul 18 09:22:43 2025 +0930
METAG_RELOC_AGAINST_DISCARDED_SECTION
Delete this macro which duplicates RELOC_AGAINST_DISCARDED_SECTION,
and instead add an rnone parameter to the standard version.
Diff:
---
bfd/elf-bfd.h | 7 +++----
bfd/elf-m10200.c | 3 ++-
bfd/elf-m10300.c | 3 ++-
bfd/elf32-arm.c | 3 ++-
bfd/elf32-avr.c | 3 ++-
bfd/elf32-bfin.c | 6 ++++--
bfd/elf32-cr16.c | 3 ++-
bfd/elf32-cris.c | 3 ++-
bfd/elf32-crx.c | 3 ++-
bfd/elf32-csky.c | 4 ++--
bfd/elf32-d10v.c | 3 ++-
bfd/elf32-epiphany.c | 3 ++-
bfd/elf32-fr30.c | 3 ++-
bfd/elf32-frv.c | 3 ++-
bfd/elf32-ft32.c | 3 ++-
bfd/elf32-h8300.c | 3 ++-
bfd/elf32-hppa.c | 2 +-
bfd/elf32-ip2k.c | 3 ++-
bfd/elf32-iq2000.c | 3 ++-
bfd/elf32-lm32.c | 3 ++-
bfd/elf32-m32c.c | 3 ++-
bfd/elf32-m32r.c | 3 ++-
bfd/elf32-m68hc1x.c | 3 ++-
bfd/elf32-m68k.c | 3 ++-
bfd/elf32-mcore.c | 3 ++-
bfd/elf32-mep.c | 3 ++-
bfd/elf32-metag.c | 43 +++----------------------------------------
bfd/elf32-moxie.c | 3 ++-
bfd/elf32-msp430.c | 3 ++-
bfd/elf32-mt.c | 3 ++-
bfd/elf32-or1k.c | 3 ++-
bfd/elf32-pru.c | 3 ++-
bfd/elf32-rl78.c | 3 ++-
bfd/elf32-rx.c | 3 ++-
bfd/elf32-s390.c | 3 ++-
bfd/elf32-score.c | 3 ++-
bfd/elf32-score7.c | 3 ++-
bfd/elf32-sh.c | 3 ++-
bfd/elf32-spu.c | 3 ++-
bfd/elf32-tic6x.c | 3 ++-
bfd/elf32-tilepro.c | 3 ++-
bfd/elf32-v850.c | 3 ++-
bfd/elf32-vax.c | 3 ++-
bfd/elf32-xstormy16.c | 3 ++-
bfd/elf32-xtensa.c | 3 ++-
bfd/elf32-z80.c | 3 ++-
bfd/elf64-alpha.c | 5 +++--
bfd/elf64-bpf.c | 3 ++-
bfd/elf64-hppa.c | 3 ++-
bfd/elf64-ia64-vms.c | 3 ++-
bfd/elf64-mmix.c | 3 ++-
bfd/elf64-s390.c | 3 ++-
bfd/elfnn-aarch64.c | 3 ++-
bfd/elfnn-ia64.c | 3 ++-
bfd/elfnn-kvx.c | 3 ++-
bfd/elfnn-loongarch.c | 5 +++--
bfd/elfnn-riscv.c | 3 ++-
bfd/elfxx-mips.c | 2 +-
bfd/elfxx-sparc.c | 3 ++-
bfd/elfxx-tilegx.c | 3 ++-
60 files changed, 124 insertions(+), 106 deletions(-)
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 5af11cf6a31..fbb1cd9e890 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -3273,10 +3273,9 @@ extern asection _bfd_elf_large_com_section;
link, we remove such relocations. Otherwise, we just want the
section contents zeroed and avoid any special processing. */
#define RELOC_AGAINST_DISCARDED_SECTION(info, input_bfd, input_section, \
- rel, count, relend, \
+ rel, count, relend, rnone, \
howto, index, contents) \
{ \
- int i_; \
_bfd_clear_contents (howto, input_bfd, input_section, \
contents, rel[index].r_offset); \
\
@@ -3309,9 +3308,9 @@ extern asection _bfd_elf_large_com_section;
} \
} \
\
- for (i_ = 0; i_ < count; i_++) \
+ for (int i_ = 0; i_ < count; i_++) \
{ \
- rel[i_].r_info = 0; \
+ rel[i_].r_info = rnone; \
rel[i_].r_addend = 0; \
} \
rel += count - 1; \
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index 246e335db16..ca9a92e1221 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -390,7 +390,8 @@ mn10200_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_MN10200_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 3aeaa06e2cc..ba993869e28 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -2101,7 +2101,8 @@ mn10300_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_MN10300_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index c913f2b4c7d..a9d92ffcef9 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -13379,7 +13379,8 @@ elf32_arm_relocate_section (bfd * output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_ARM_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index a98f18132ed..6653e4d72f6 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1474,7 +1474,8 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_AVR_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index 7ac95a0634e..69317b3f865 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -1442,7 +1442,8 @@ bfin_relocate_section (bfd * output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_BFIN_UNUSED0,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
@@ -2583,7 +2584,8 @@ bfinfdpic_relocate_section (bfd * output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_BFIN_UNUSED0,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c
index 68ac71f69e5..fc2e2d48f27 100644
--- a/bfd/elf32-cr16.c
+++ b/bfd/elf32-cr16.c
@@ -1384,7 +1384,8 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_CR16_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 306d3e792b1..285c6c794a2 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1129,7 +1129,8 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_CRIS_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c
index 3516ef7aced..d2bc1f7ba72 100644
--- a/bfd/elf32-crx.c
+++ b/bfd/elf32-crx.c
@@ -879,7 +879,8 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_CRX_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c
index 47a63895b55..a03f0021dba 100644
--- a/bfd/elf32-csky.c
+++ b/bfd/elf32-csky.c
@@ -4381,8 +4381,8 @@ csky_elf_relocate_section (bfd * output_bfd,
else
#endif
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0,
- contents);
+ rel, 1, relend, R_CKCORE_NONE,
+ howto, 0, contents);
}
if (bfd_link_relocatable (info))
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index e8df171e29a..5474f57a453 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -470,7 +470,8 @@ elf32_d10v_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_D10V_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c
index fe2250ff18a..ea60ce4dc72 100644
--- a/bfd/elf32-epiphany.c
+++ b/bfd/elf32-epiphany.c
@@ -533,7 +533,8 @@ epiphany_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_EPIPHANY_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index 5c5dfd77875..d0ca4e893e5 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -565,7 +565,8 @@ fr30_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_FR30_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index b1290864366..0423540cf98 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -2753,7 +2753,8 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_FRV_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c
index fb0e990605f..6ca175533da 100644
--- a/bfd/elf32-ft32.c
+++ b/bfd/elf32-ft32.c
@@ -403,7 +403,8 @@ ft32_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_FT32_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index a428e076cb4..e183577fca4 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -480,7 +480,8 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_H8_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 759912d74ad..80b89fac38b 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3594,7 +3594,7 @@ elf32_hppa_relocate_section (bfd *output_bfd,
if (sym_sec != NULL && discarded_section (sym_sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rela, 1, relend,
+ rela, 1, relend, R_PARISC_NONE,
elf_hppa_howto_table + r_type, 0,
contents);
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 0d082471b7c..5c28a06f318 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1448,7 +1448,8 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_IP2K_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index b53188ec927..11d6e1e347d 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -642,7 +642,8 @@ iq2000_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_IQ2000_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index 45264d69c67..b36e92d150a 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -794,7 +794,8 @@ lm32_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_LM32_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c
index 890a0ac59a6..8f6881bcb0b 100644
--- a/bfd/elf32-m32c.c
+++ b/bfd/elf32-m32c.c
@@ -485,7 +485,8 @@ m32c_elf_relocate_section
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_M32C_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 022b0ac30ac..49cc5fc4240 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -2354,7 +2354,8 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_M32R_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info) && !use_rel)
{
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 7929d55cb88..7e8e0383717 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -1015,7 +1015,8 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_M68HC11_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index d7387d938e8..84ad64ac0ec 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -3500,7 +3500,8 @@ elf_m68k_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_68K_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 0a6527622ec..2d4e7a9cb26 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -480,7 +480,8 @@ mcore_elf_relocate_section (bfd * output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_MCORE_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c
index 300e057771c..0188fd04f25 100644
--- a/bfd/elf32-mep.c
+++ b/bfd/elf32-mep.c
@@ -489,7 +489,8 @@ mep_elf_relocate_section
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_MEP_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index 9959a1f5dd0..0e6cfd885fe 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -1383,44 +1383,6 @@ metag_final_link_relocate (reloc_howto_type *howto,
return r;
}
-/* This is defined because R_METAG_NONE != 0...
- See RELOC_AGAINST_DISCARDED_SECTION for details. */
-#define METAG_RELOC_AGAINST_DISCARDED_SECTION(info, input_bfd, input_section, \
- rel, relend, howto, contents) \
- { \
- _bfd_clear_contents (howto, input_bfd, input_section, \
- contents, rel->r_offset); \
- \
- if (bfd_link_relocatable (info) \
- && (input_section->flags & SEC_DEBUGGING)) \
- { \
- /* Only remove relocations in debug sections since other \
- sections may require relocations. */ \
- Elf_Internal_Shdr *rel_hdr; \
- \
- rel_hdr = _bfd_elf_single_rel_hdr (input_section->output_section); \
- \
- /* Avoid empty output section. */ \
- if (rel_hdr->sh_size > rel_hdr->sh_entsize) \
- { \
- rel_hdr->sh_size -= rel_hdr->sh_entsize; \
- rel_hdr = _bfd_elf_single_rel_hdr (input_section); \
- rel_hdr->sh_size -= rel_hdr->sh_entsize; \
- \
- memmove (rel, rel + 1, (relend - rel) * sizeof (*rel)); \
- \
- input_section->reloc_count--; \
- relend--; \
- rel--; \
- continue; \
- } \
- } \
- \
- rel->r_info = R_METAG_NONE; \
- rel->r_addend = 0; \
- continue; \
- }
-
/* Relocate a META ELF section.
The RELOCATE_SECTION function is called by the new ELF backend linker
@@ -1529,8 +1491,9 @@ elf_metag_relocate_section (bfd *output_bfd,
}
if (sec != NULL && discarded_section (sec))
- METAG_RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, relend, howto, contents);
+ RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
+ rel, 1, relend, R_METAG_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c
index 949a8edad61..d2a95f53718 100644
--- a/bfd/elf32-moxie.c
+++ b/bfd/elf32-moxie.c
@@ -259,7 +259,8 @@ moxie_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_MOXIE_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index 77099655aba..3b356bfe4e2 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -1477,7 +1477,8 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_MSP430_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c
index ed4acef147a..b1ba28b5d49 100644
--- a/bfd/elf32-mt.c
+++ b/bfd/elf32-mt.c
@@ -363,7 +363,8 @@ mt_elf_relocate_section
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_MT_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index bdee1f1fb99..b17a872f123 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -1407,7 +1407,8 @@ or1k_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_OR1K_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-pru.c b/bfd/elf32-pru.c
index 586519ac279..45a86be3ccf 100644
--- a/bfd/elf32-pru.c
+++ b/bfd/elf32-pru.c
@@ -750,7 +750,8 @@ pru_elf32_relocate_section (bfd *output_bfd,
if (sec && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_PRU_NONE,
+ howto, 0, contents);
/* Nothing more to do unless this is a final link. */
if (bfd_link_relocatable (info))
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index c0b8850cd93..e2ea6b1d15f 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -772,7 +772,8 @@ rl78_elf_relocate_section
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_RL78_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c
index 219c838229d..d8a2236a233 100644
--- a/bfd/elf32-rx.c
+++ b/bfd/elf32-rx.c
@@ -652,7 +652,8 @@ rx_elf_relocate_section
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_RX_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 470335ca602..40fcb53ff3a 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -2145,7 +2145,8 @@ elf_s390_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_390_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index 63a185442de..57bf04d9366 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -2671,7 +2671,8 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_SCORE_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c
index 448215550ce..cbbff13933e 100644
--- a/bfd/elf32-score7.c
+++ b/bfd/elf32-score7.c
@@ -2447,7 +2447,8 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_SCORE_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index abb7f5eb8ab..d3f3a567589 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -3697,7 +3697,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_SH_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index 919b839671d..de051e48185 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -4938,7 +4938,8 @@ spu_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_SPU_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index 0adab1acc07..cc204c2ca08 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -2220,7 +2220,8 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_C6000_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index 6f901725524..3e3a068ac7b 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -2607,7 +2607,8 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_TILEPRO_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 0c523892164..27744814691 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -2253,7 +2253,8 @@ v850_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_V850_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 9d1fee86797..4cb69ad3117 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1304,7 +1304,8 @@ elf_vax_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_VAX_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index 3fe619d5869..5cee2f389eb 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -824,7 +824,8 @@ xstormy16_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_XSTORMY16_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index f9c006c345c..6f8a4fa7c21 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -2617,7 +2617,8 @@ elf_xtensa_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_XTENSA_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf32-z80.c b/bfd/elf32-z80.c
index 3134017ef4b..8751633ba0f 100644
--- a/bfd/elf32-z80.c
+++ b/bfd/elf32-z80.c
@@ -441,7 +441,8 @@ z80_elf_relocate_section (bfd *output_bfd,
reloc_howto_type *howto;
howto = z80_rtype_to_howto (input_bfd, r_type);
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_Z80_NONE,
+ howto, 0, contents);
}
if (bfd_link_relocatable (info))
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index b3570cebf5a..55aebca0ee8 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -4093,7 +4093,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend,
+ rel, 1, relend, R_ALPHA_NONE,
elf64_alpha_howto_table + r_type, 0,
contents);
@@ -4300,7 +4300,8 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_ALPHA_NONE,
+ howto, 0, contents);
addend = rel->r_addend;
value += addend;
diff --git a/bfd/elf64-bpf.c b/bfd/elf64-bpf.c
index 43ae6fe0365..c9be282050c 100644
--- a/bfd/elf64-bpf.c
+++ b/bfd/elf64-bpf.c
@@ -241,7 +241,8 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_BPF_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 3f5a3fea4ab..7b80603fdaf 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -3865,7 +3865,8 @@ elf64_hppa_relocate_section (bfd *output_bfd,
if (sym_sec != NULL && discarded_section (sym_sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_PARISC_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index 87cc16d7148..822b263ae2c 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -3518,7 +3518,8 @@ elf64_ia64_relocate_section (bfd *output_bfd,
section contents zeroed. Avoid any special processing. */
if (sym_sec != NULL && discarded_section (sym_sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_IA64_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 1b5a65d8479..bb8350718a2 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -1426,7 +1426,8 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_MMIX_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
{
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index a79cc476572..6ae62a91112 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -2386,7 +2386,8 @@ elf_s390_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_390_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 9e98215d638..0425e62c8e3 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -7059,7 +7059,8 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_AARCH64_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c
index 075b3447815..685a37f4072 100644
--- a/bfd/elfnn-ia64.c
+++ b/bfd/elfnn-ia64.c
@@ -3911,7 +3911,8 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
if (sym_sec != NULL && discarded_section (sym_sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_IA64_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elfnn-kvx.c b/bfd/elfnn-kvx.c
index 31dd7a5eed5..0634ad389d5 100644
--- a/bfd/elfnn-kvx.c
+++ b/bfd/elfnn-kvx.c
@@ -2541,7 +2541,8 @@ elfNN_kvx_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_KVX_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index 46fafb332de..1ddea2f4f8c 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -3403,8 +3403,9 @@ loongarch_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
name = loongarch_sym_name (input_bfd, h, sym);
if (sec != NULL && discarded_section (sec))
- RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, rel,
- 1, relend, howto, 0, contents);
+ RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
+ rel, 1, relend, R_LARCH_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 2fd01299249..9f4bc0af4ba 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -2510,7 +2510,8 @@ riscv_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_RISCV_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 3c38f51aefd..a171af59bf8 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -10480,7 +10480,7 @@ mips_reloc_against_discarded_section (bfd *output_bfd,
do
{
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- (*rel), count, (*relend),
+ (*rel), count, (*relend), R_MIPS_NONE,
howto, i, contents);
}
while (0);
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 3d89a5f1497..f0b379555af 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -2892,7 +2892,8 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_SPARC_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index afa9e86add5..1854e693931 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -2894,7 +2894,8 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (sec != NULL && discarded_section (sec))
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
- rel, 1, relend, howto, 0, contents);
+ rel, 1, relend, R_TILEGX_NONE,
+ howto, 0, contents);
if (bfd_link_relocatable (info))
continue;
More information about the Binutils-cvs
mailing list