]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
METAG_RELOC_AGAINST_DISCARDED_SECTION
authorAlan Modra <amodra@gmail.com>
Thu, 17 Jul 2025 23:52:43 +0000 (09:22 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 18 Jul 2025 00:55:05 +0000 (10:25 +0930)
Delete this macro which duplicates RELOC_AGAINST_DISCARDED_SECTION,
and instead add an rnone parameter to the standard version.

60 files changed:
bfd/elf-bfd.h
bfd/elf-m10200.c
bfd/elf-m10300.c
bfd/elf32-arm.c
bfd/elf32-avr.c
bfd/elf32-bfin.c
bfd/elf32-cr16.c
bfd/elf32-cris.c
bfd/elf32-crx.c
bfd/elf32-csky.c
bfd/elf32-d10v.c
bfd/elf32-epiphany.c
bfd/elf32-fr30.c
bfd/elf32-frv.c
bfd/elf32-ft32.c
bfd/elf32-h8300.c
bfd/elf32-hppa.c
bfd/elf32-ip2k.c
bfd/elf32-iq2000.c
bfd/elf32-lm32.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68k.c
bfd/elf32-mcore.c
bfd/elf32-mep.c
bfd/elf32-metag.c
bfd/elf32-moxie.c
bfd/elf32-msp430.c
bfd/elf32-mt.c
bfd/elf32-or1k.c
bfd/elf32-pru.c
bfd/elf32-rl78.c
bfd/elf32-rx.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-spu.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf32-v850.c
bfd/elf32-vax.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf32-z80.c
bfd/elf64-alpha.c
bfd/elf64-bpf.c
bfd/elf64-hppa.c
bfd/elf64-ia64-vms.c
bfd/elf64-mmix.c
bfd/elf64-s390.c
bfd/elfnn-aarch64.c
bfd/elfnn-ia64.c
bfd/elfnn-kvx.c
bfd/elfnn-loongarch.c
bfd/elfnn-riscv.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/elfxx-tilegx.c

index 5af11cf6a31b4621a54d38998d62006250e388b9..fbb1cd9e8905e931548eabdf3c523499ee412091 100644 (file)
@@ -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;                                                  \
index 246e335db16f27aea17794fbea297b8f701fac13..ca9a92e1221a9ea4fd67d00a963830e099a6f068 100644 (file)
@@ -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;
index 3aeaa06e2cc3c282d21ea3b535d9639fc1d407fd..ba993869e2835d615869ae7913864395a9c6da0f 100644 (file)
@@ -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;
index c913f2b4c7db5c4c433dfeb99b4a713672256f58..a9d92ffcef9409093c5b47ab2eb754b4c24606df 100644 (file)
@@ -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))
        {
index a98f18132ed7a2eaff8b7282f60d4a66bd5efb44..6653e4d72f6304101b12f4de83ec4ed94d492d12 100644 (file)
@@ -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;
index 7ac95a0634e3bd331625aa70f39e89c937b95178..69317b3f865c6f725268a362ba3e51e6936a00de 100644 (file)
@@ -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;
index 68ac71f69e599a58da617a61f968e0575758701b..fc2e2d48f270abfcfc63acf70b9ea257347b6bbe 100644 (file)
@@ -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;
index 306d3e792b19f2e6c7e3776ed1c43f1b8bc002b1..285c6c794a2260bd0d6539ed39a676808faae2cd 100644 (file)
@@ -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;
index 3516ef7aced9839dc6015937f706ed7b4e2a279f..d2bc1f7ba72b2858a5895ce1a8d77d49d11c2d88 100644 (file)
@@ -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;
index 47a63895b55ea9d7fb58db3784a31637dd8854dc..a03f0021dbad0742242feff6509a8903a0e29710 100644 (file)
@@ -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))
index e8df171e29acb3530d36de8474d6491e5d8b29ee..5474f57a4533dfed196a03e7507c632d5479da12 100644 (file)
@@ -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;
index fe2250ff18a478a25cad607ee6b9842b57b6ac1f..ea60ce4dc72ea8ccaef6b9d5d51b7e829fa3c50f 100644 (file)
@@ -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;
index 5c5dfd778751b280a20a18e54f99bbbf441d961d..d0ca4e893e59e289e5ae8cd5a9e9656440ee136f 100644 (file)
@@ -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;
index b12908643667d96fcd103a6ef70d5140c08a5656..0423540cf98839245086dfe13e0651a5421289ca 100644 (file)
@@ -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;
index fb0e990605fdc38a59a33301fa22cb9d73c50127..6ca175533da6d69be754edad65941ba1a46fdaa8 100644 (file)
@@ -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;
index a428e076cb472216a4d61881f54abc04427b9b07..e183577fca4096e24bdd1c6f5055cc22a1933d33 100644 (file)
@@ -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;
index 759912d74adc9527fcb4dac2c04c0ea48da456c8..80b89fac38b743500a2e3a583d7143bef1181a78 100644 (file)
@@ -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);
 
index 0d082471b7c56f7dbe71509b77bf4e138299d929..5c28a06f31837e6b0ab688f02c50888c501f7735 100644 (file)
@@ -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;
index b53188ec927833a192d77912ae43d51d891d4318..11d6e1e347dbb8368f0907269eb19214ea6a3032 100644 (file)
@@ -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;
index 45264d69c671019c786d7d11cd721e0238301baf..b36e92d150a481fe0c70479e9c719087e031d96f 100644 (file)
@@ -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))
        {
index 890a0ac59a66d3b747f21d6f46b03c1cedeaba0f..8f6881bcb0b60e463e9878d10d97b4529909b60d 100644 (file)
@@ -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))
        {
index 022b0ac30ac2878d32d550497bfb43b72b0fe73a..49cc5fc42407ea4daceb95263b75a1c47b387589 100644 (file)
@@ -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)
        {
index 7929d55cb88dd9c2ad51bde6d0e2150f2fdcea9e..7e8e0383717f4a7c6295df085360eccb379a993b 100644 (file)
@@ -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))
        {
index d7387d938e889f6ec1058b94e2f1a74511e5ec35..84ad64ac0ec2207e67161edb42be496fa91219ef 100644 (file)
@@ -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;
index 0a6527622ec7704e25f3ea6f900412e276f14961..2d4e7a9cb267d7b5f211ea24430f882a53ca75f9 100644 (file)
@@ -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;
index 300e057771cd03d0e0e90a3315994015dbac50e9..0188fd04f25adbd476d1a4ca17dc75de2dcf756c 100644 (file)
@@ -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;
index 9959a1f5dd04cc37a4637ae16da3c057d9e9248a..0e6cfd885fee5af0b378818dc717c6d8f501c0ad 100644 (file)
@@ -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;
index 949a8edad611f453195ba420fe42eccff8c05dcf..d2a95f53718de8b8532b81e5719f2a890adbb47a 100644 (file)
@@ -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;
index 77099655aba5f6030f95d3247eddab10c4f60ccc..3b356bfe4e258ca39fcb29126ea66e12f1038db2 100644 (file)
@@ -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;
index ed4acef147acd64577161743948bf989f6e27389..b1ba28b5d49b26175874204b71e3ab375e76b052 100644 (file)
@@ -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;
index bdee1f1fb99c627f214526ae976c23cfd71dc503..b17a872f12392a90d4a2f76c8e73f4db3d166a92 100644 (file)
@@ -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;
index 586519ac279616100ecbb6eb315eb686b923c3a9..45a86be3ccf9f8311bbb542c5a99331f7fc1b9f7 100644 (file)
@@ -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))
index c0b8850cd9308935b9addd651557f01c216eee19..e2ea6b1d15fa5c4e7c01bc98f857e3fdff53f242 100644 (file)
@@ -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))
        {
index 219c838229d0c2e309b042f96f2b66416ce11911..d8a2236a233bc2f8e70a127d9feded9442cfac50 100644 (file)
@@ -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))
        {
index 470335ca602e5632cd1a9a21dc3fe4a4d7e7d996..40fcb53ff3a7c256ace93a02427542456a65c4a5 100644 (file)
@@ -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;
index 63a185442ded581f8beb632ba1ffab0eb12cdd6f..57bf04d93665a914f6036acd5d37c181661a8e02 100644 (file)
@@ -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))
        {
index 448215550ceaccc04066fe68d7f316753e011d20..cbbff13933e19d9833a82bcea2434f8978678b46 100644 (file)
@@ -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))
        {
index abb7f5eb8aba264f0352ec012256e58df0c3d56e..d3f3a5675896f5038ccb208d324c68ce525cb2c4 100644 (file)
@@ -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;
index 919b839671dd57a19b2cf578211a62173f6f7ba0..de051e481851cd770d9c8d390f3d99e75f3180e0 100644 (file)
@@ -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;
index 0adab1acc07fb2e1045583630d0d65c484bdb2a9..cc204c2ca084ace83c0ee7b16989fbab72e18c20 100644 (file)
@@ -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))
        {
index 6f9017255240bf2460dfe1a80dd5c30881f57b82..3e3a068ac7bde8d6a03a1c22a4134209c4903b2f 100644 (file)
@@ -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;
index 0c523892164ee781b8960352f606437ac09430c2..27744814691e768463cc2f95d5b7df95903982dc 100644 (file)
@@ -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;
index 9d1fee86797bf41dfba34dfc2fe741fae3da7d66..4cb69ad3117a0ba22237e7c8fdf51f6ef20e8c7e 100644 (file)
@@ -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;
index 3fe619d5869a5aa2940ea18b04cda1904fdb50b7..5cee2f389ebd1695dacfc7b76cceb49eec580edf 100644 (file)
@@ -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;
index f9c006c345c81be035bfb4fd823b5834bbf1a794..6f8a4fa7c213bff9b4c3335d6a10a4d377712c26 100644 (file)
@@ -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))
        {
index 3134017ef4ba170817a8d26afdfb59f3b1a576a0..8751633ba0fde811c313d3d69e3555a3f4da7721 100644 (file)
@@ -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))
index b3570cebf5af5696dea87aeb1166347d1def630c..55aebca0ee820d1500dc07ac55cd1a7df93eb528 100644 (file)
@@ -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;
index 43ae6fe0365b0bfa139fe3d1f49d704bdb71f244..c9be282050c756e8fc624d4d871895af0e626c61 100644 (file)
@@ -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;
index 3f5a3fea4abf43ee93571ac54322cae0ec9aefb0..7b80603fdafd648fef39f766e2cf10b6a45cf888 100644 (file)
@@ -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;
index 87cc16d71485fb1ccd3a69e11c6b509c47de9d17..822b263ae2c3ea0ccba8f3a145594e550fd04923 100644 (file)
@@ -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;
index 1b5a65d847976525bbb32381b471f64dedce746a..bb8350718a216c0ff89f3edee1e97410b0c0cdaf 100644 (file)
@@ -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))
        {
index a79cc476572d9c6fa05a89d8fef90d7becaf3e06..6ae62a91112dab5c281ea15feb5416ff8adc19c9 100644 (file)
@@ -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;
index 9e98215d638be837be9f1f6c8bfe9a3816b6faeb..0425e62c8e3a9b0aae38d6e3bbd6aba71578c6be 100644 (file)
@@ -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;
index 075b3447815a5272b79a2598711f5a4891908804..685a37f407280eb5e5b43d9f4a3d22f30f74e9bd 100644 (file)
@@ -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;
index 31dd7a5eed5b3261384072dafddf99f8ea25a689..0634ad389d5f916776d807ecc2b16285b5be277a 100644 (file)
@@ -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;
index 46fafb332de8ce98399a4f9321b3bc809e32ab4d..1ddea2f4f8c9c796fcb23009826642d58fe85064 100644 (file)
@@ -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;
index 2fd0129924954640778a94578e00c9628cc2180e..9f4bc0af4ba460f853224e304465e827208e056e 100644 (file)
@@ -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;
index 3c38f51aefd78e23eb8dbbbf381251b4bc47cbe1..a171af59bf8b941b68e02b4ae03653c72ef8b4cc 100644 (file)
@@ -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);
index 3d89a5f1497b678306b44548cccc255df2414fe5..f0b379555afe17c84bac1fc967d9528947d79d53 100644 (file)
@@ -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;
index afa9e86add58234fb97c0cc8ded1a527d39a784c..1854e693931e0b5c46c65ca3d932d253ded70896 100644 (file)
@@ -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;