* elfxx-target.h (USE_REL): Don't define as 1.
authorAlan Modra <amodra@gmail.com>
Thu, 17 Oct 2002 02:59:15 +0000 (02:59 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 17 Oct 2002 02:59:15 +0000 (02:59 +0000)
* elf32-arm.h (USE_REL): Provide a default define of 0.
Use #if rather than #ifdef when testing USE_REL.
* elf32-m32r.c: Likewise.

* elf32-arc.c (USE_REL): Define as 1.
* elf32-d10v.c (USE_REL): Likewise.
* elf32-m32r.c (USE_REL): Likewise.
* elf32-m68hc11.c (USE_REL): Likewise.
* elf32-m68hc12.c (USE_REL): Likewise.
* elf32-or32.c (USE_REL): Likewise.
* elfarm-nabi.c (USE_REL): Likewise.

bfd/ChangeLog
bfd/elf32-arc.c
bfd/elf32-arm.h
bfd/elf32-d10v.c
bfd/elf32-m32r.c
bfd/elf32-m68hc11.c
bfd/elf32-m68hc12.c
bfd/elf32-or32.c
bfd/elfarm-nabi.c
bfd/elfxx-target.h

index 462567600487ad204e610f977ba164fd11846330..ba10387281c84349e569f3eead359ed868872265 100644 (file)
@@ -1,3 +1,18 @@
+2002-10-17  Alan Modra  <amodra@bigpond.net.au>
+
+       * elfxx-target.h (USE_REL): Don't define as 1.
+       * elf32-arm.h (USE_REL): Provide a default define of 0.
+       Use #if rather than #ifdef when testing USE_REL.
+       * elf32-m32r.c: Likewise.
+
+       * elf32-arc.c (USE_REL): Define as 1.
+       * elf32-d10v.c (USE_REL): Likewise.
+       * elf32-m32r.c (USE_REL): Likewise.
+       * elf32-m68hc11.c (USE_REL): Likewise.
+       * elf32-m68hc12.c (USE_REL): Likewise.
+       * elf32-or32.c (USE_REL): Likewise.
+       * elfarm-nabi.c (USE_REL): Likewise.
+
 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
 
        * config.bfd (s390-*-linux*): Add targ64_selvecs.
 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
 
        * config.bfd (s390-*-linux*): Add targ64_selvecs.
index ff5c5f4718933d7b7d1db1033287dfd505fa8cb4..fad1a1e86dd0bb99b65ec3dce876e908085c57b5 100644 (file)
@@ -1,5 +1,6 @@
 /* ARC-specific support for 32-bit ELF
 /* ARC-specific support for 32-bit ELF
-   Copyright 1994, 1995, 1997, 1999, 2001 Free Software Foundation, Inc.
+   Copyright 1994, 1995, 1997, 1999, 2001, 2002
+   Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
    Contributed by Doug Evans (dje@cygnus.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -39,7 +40,7 @@ static bfd_reloc_status_type arc_elf_b22_pcrel
 /* Try to minimize the amount of space occupied by relocation tables
    on the ROM (not that the ROM won't be swamped by other ELF overhead).  */
 
 /* Try to minimize the amount of space occupied by relocation tables
    on the ROM (not that the ROM won't be swamped by other ELF overhead).  */
 
-#define USE_REL
+#define USE_REL        1
 
 static reloc_howto_type elf_arc_howto_table[] =
 {
 
 static reloc_howto_type elf_arc_howto_table[] =
 {
index 9ede796133d976d16ba2c6e2ad9a49fd6cb31548..5901aeaa090c54214851286280afb3cd4a41754e 100644 (file)
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+#ifndef USE_REL
+#define USE_REL        0
+#endif
+
 typedef unsigned long int insn32;
 typedef unsigned short int insn16;
 
 typedef unsigned long int insn32;
 typedef unsigned short int insn16;
 
@@ -76,7 +80,7 @@ static boolean elf32_arm_finish_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
 static struct bfd_hash_entry * elf32_arm_link_hash_newfunc
   PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
   PARAMS ((bfd *, struct bfd_link_info *));
 static struct bfd_hash_entry * elf32_arm_link_hash_newfunc
   PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-#ifdef USE_REL
+#if USE_REL
 static void arm_add_to_rel
   PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
 #endif
 static void arm_add_to_rel
   PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
 #endif
@@ -1094,7 +1098,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
   local_got_offsets = elf_local_got_offsets (input_bfd);
   r_symndx = ELF32_R_SYM (rel->r_info);
 
   local_got_offsets = elf_local_got_offsets (input_bfd);
   r_symndx = ELF32_R_SYM (rel->r_info);
 
-#ifdef USE_REL
+#if USE_REL
   addend = bfd_get_32 (input_bfd, hit_data) & howto->src_mask;
 
   if (addend & ((howto->src_mask + 1) >> 1))
   addend = bfd_get_32 (input_bfd, hit_data) & howto->src_mask;
 
   if (addend & ((howto->src_mask + 1) >> 1))
@@ -1370,7 +1374,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
 
     case R_ARM_THM_ABS5:
       /* Support ldr and str instructions for the thumb.  */
 
     case R_ARM_THM_ABS5:
       /* Support ldr and str instructions for the thumb.  */
-#ifdef USE_REL
+#if USE_REL
       /* Need to refetch addend.  */
       addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
       /* ??? Need to determine shift amount from operand size.  */
       /* Need to refetch addend.  */
       addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
       /* ??? Need to determine shift amount from operand size.  */
@@ -1402,7 +1406,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
        bfd_vma        check;
        bfd_signed_vma signed_check;
 
        bfd_vma        check;
        bfd_signed_vma signed_check;
 
-#ifdef USE_REL
+#if USE_REL
        /* Need to refetch the addend and squish the two 11 bit pieces
           together.  */
        {
        /* Need to refetch the addend and squish the two 11 bit pieces
           together.  */
        {
@@ -1507,7 +1511,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
        bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
        bfd_signed_vma signed_check;
 
        bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
        bfd_signed_vma signed_check;
 
-#ifdef USE_REL
+#if USE_REL
        /* Need to refetch addend.  */
        addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
        if (addend & ((howto->src_mask + 1) >> 1))
        /* Need to refetch addend.  */
        addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
        if (addend & ((howto->src_mask + 1) >> 1))
@@ -1745,7 +1749,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
     }
 }
 
     }
 }
 
-#ifdef USE_REL
+#if USE_REL
 /* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS.  */
 static void
 arm_add_to_rel (abfd, address, howto, increment)
 /* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS.  */
 static void
 arm_add_to_rel (abfd, address, howto, increment)
@@ -1837,7 +1841,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
   Elf_Internal_Rela *           relend;
   const char *                  name;
 
   Elf_Internal_Rela *           relend;
   const char *                  name;
 
-#ifndef USE_REL
+#if !USE_REL
   if (info->relocateable)
     return true;
 #endif
   if (info->relocateable)
     return true;
 #endif
@@ -1866,7 +1870,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
           || r_type == R_ARM_GNU_VTINHERIT)
         continue;
 
           || r_type == R_ARM_GNU_VTINHERIT)
         continue;
 
-#ifdef USE_REL
+#if USE_REL
       elf32_arm_info_to_howto (input_bfd, & bfd_reloc,
                               (Elf_Internal_Rel *) rel);
 #else
       elf32_arm_info_to_howto (input_bfd, & bfd_reloc,
                               (Elf_Internal_Rel *) rel);
 #else
@@ -1874,7 +1878,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
 #endif
       howto = bfd_reloc.howto;
 
 #endif
       howto = bfd_reloc.howto;
 
-#ifdef USE_REL
+#if USE_REL
       if (info->relocateable)
        {
          /* This is a relocateable link.  We don't have to change
       if (info->relocateable)
        {
          /* This is a relocateable link.  We don't have to change
@@ -1907,7 +1911,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
        {
          sym = local_syms + r_symndx;
          sec = local_sections[r_symndx];
        {
          sym = local_syms + r_symndx;
          sec = local_sections[r_symndx];
-#ifdef USE_REL
+#if USE_REL
          relocation = (sec->output_section->vma
                        + sec->output_offset
                        + sym->st_value);
          relocation = (sec->output_section->vma
                        + sec->output_offset
                        + sym->st_value);
@@ -3676,7 +3680,7 @@ elf32_arm_reloc_type_class (rela)
 #define elf_backend_plt_readonly    1
 #define elf_backend_want_got_plt    1
 #define elf_backend_want_plt_sym    0
 #define elf_backend_plt_readonly    1
 #define elf_backend_want_got_plt    1
 #define elf_backend_want_plt_sym    0
-#ifndef USE_REL
+#if !USE_REL
 #define elf_backend_rela_normal     1
 #endif
 
 #define elf_backend_rela_normal     1
 #endif
 
index 1dec0b08a131189f1a6d3d3ed7317bd92e8bfbbb..fe31b925c0aadd9497092aee23a9f4ce26629b8e 100644 (file)
@@ -43,7 +43,7 @@ static boolean elf32_d10v_relocate_section
           asection **));
 
 /* Use REL instead of RELA to save space.  */
           asection **));
 
 /* Use REL instead of RELA to save space.  */
-#define USE_REL
+#define USE_REL        1
 
 static reloc_howto_type elf_d10v_howto_table[] =
   {
 
 static reloc_howto_type elf_d10v_howto_table[] =
   {
index 8adb1e2f61103da7854764f2a649820d7c92382c..7a7d500c8118d31b386cc0117fe1c7b67829f437 100644 (file)
@@ -88,7 +88,11 @@ asection * m32r_elf_gc_mark_hook
    This only saves space in libraries and object files, but perhaps
    relocs will be put in ROM?  All in all though, REL relocs are a pain
    to work with.  */
    This only saves space in libraries and object files, but perhaps
    relocs will be put in ROM?  All in all though, REL relocs are a pain
    to work with.  */
-#define USE_REL
+#define USE_REL        1
+
+#ifndef USE_REL
+#define USE_REL        0
+#endif
 
 static reloc_howto_type m32r_elf_howto_table[] =
 {
 
 static reloc_howto_type m32r_elf_howto_table[] =
 {
@@ -982,7 +986,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
   /* Assume success.  */
   boolean ret = true;
 
   /* Assume success.  */
   boolean ret = true;
 
-#ifndef USE_REL
+#if !USE_REL
   if (info->relocateable)
     return true;
 #endif
   if (info->relocateable)
     return true;
 #endif
@@ -1026,7 +1030,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
       howto = m32r_elf_howto_table + r_type;
       r_symndx = ELF32_R_SYM (rel->r_info);
 
       howto = m32r_elf_howto_table + r_type;
       r_symndx = ELF32_R_SYM (rel->r_info);
 
-#ifdef USE_REL
+#if USE_REL
       if (info->relocateable)
        {
          /* This is a relocateable link.  We don't have to change
       if (info->relocateable)
        {
          /* This is a relocateable link.  We don't have to change
@@ -1102,7 +1106,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
              sym = local_syms + r_symndx;
              sec = local_sections[r_symndx];
              sym_name = "<local symbol>";
              sym = local_syms + r_symndx;
              sec = local_sections[r_symndx];
              sym_name = "<local symbol>";
-#ifndef USE_REL
+#if !USE_REL
              relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
              addend = rel->r_addend;
 #else
              relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
              addend = rel->r_addend;
 #else
@@ -1507,7 +1511,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
             will be at least 4 bytes closer if we can relax.  It'll actually
             be 4 or 8 bytes closer, but we don't know which just yet and
             the difference isn't significant enough to worry about.  */
             will be at least 4 bytes closer if we can relax.  It'll actually
             be 4 or 8 bytes closer, but we don't know which just yet and
             the difference isn't significant enough to worry about.  */
-#ifndef USE_REL /* put in for learning purposes */
+#if !USE_REL /* put in for learning purposes */
          pcrel_value += irel->r_addend;
 #else
          addend = bfd_get_signed_16 (abfd, contents + irel->r_offset + 2);
          pcrel_value += irel->r_addend;
 #else
          addend = bfd_get_signed_16 (abfd, contents + irel->r_offset + 2);
@@ -1536,7 +1540,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
                     We OR in CODE just in case it's not a nop (technically,
                     CODE currently must be a nop, but for cleanness we
                     allow it to be anything).  */
                     We OR in CODE just in case it's not a nop (technically,
                     CODE currently must be a nop, but for cleanness we
                     allow it to be anything).  */
-#ifndef USE_REL /* put in for learning purposes */
+#if !USE_REL /* put in for learning purposes */
                  code = 0x7e000000 | MAKE_PARALLEL (code);
 #else
                  code = (0x7e000000 + (((addend >> 2) & 0xff) << 16)) | MAKE_PARALLEL (code);
                  code = 0x7e000000 | MAKE_PARALLEL (code);
 #else
                  code = (0x7e000000 + (((addend >> 2) & 0xff) << 16)) | MAKE_PARALLEL (code);
@@ -1546,7 +1550,7 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
              else
                {
                  /* Change the seth rN,foo to a bl24 foo.  */
              else
                {
                  /* Change the seth rN,foo to a bl24 foo.  */
-#ifndef USE_REL /* put in for learning purposes */
+#if !USE_REL /* put in for learning purposes */
                  code = 0xfe000000;
 #else
                  code = 0xfe000000 + ((addend >> 2) & 0xffffff);
                  code = 0xfe000000;
 #else
                  code = 0xfe000000 + ((addend >> 2) & 0xffffff);
@@ -2107,7 +2111,7 @@ m32r_elf_check_relocs (abfd, info, sec, relocs)
 #define elf_backend_check_relocs                m32r_elf_check_relocs
 
 #define elf_backend_can_gc_sections             1
 #define elf_backend_check_relocs                m32r_elf_check_relocs
 
 #define elf_backend_can_gc_sections             1
-#ifndef USE_REL
+#if !USE_REL
 #define elf_backend_rela_normal                        1
 #endif
 #if 0 /* not yet */
 #define elf_backend_rela_normal                        1
 #endif
 #if 0 /* not yet */
index ae4bb982bc84b7dc25f2fefe2ca420dd744e9af3..9f05a9e1d8487851af17adffa8b12aad27a29604 100644 (file)
@@ -62,7 +62,7 @@ boolean _bfd_m68hc11_elf_set_private_flags PARAMS ((bfd *, flagword));
 boolean _bfd_m68hc11_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
 
 /* Use REL instead of RELA to save space */
 boolean _bfd_m68hc11_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
 
 /* Use REL instead of RELA to save space */
-#define USE_REL
+#define USE_REL        1
 
 /* The Motorola 68HC11 microcontroler only addresses 64Kb.
    We must handle 8 and 16-bit relocations.  The 32-bit relocation
 
 /* The Motorola 68HC11 microcontroler only addresses 64Kb.
    We must handle 8 and 16-bit relocations.  The 32-bit relocation
index 9ab8780574c86c9c479072cb8a488f7e754eecac..ea12e3b999e779c72957db0bc28c66a3fa6b83eb 100644 (file)
@@ -54,7 +54,7 @@ boolean _bfd_m68hc12_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
 
 
 /* Use REL instead of RELA to save space */
 
 
 /* Use REL instead of RELA to save space */
-#define USE_REL
+#define USE_REL        1
 
 /* The Motorola 68HC11 microcontroler only addresses 64Kb.
    We must handle 8 and 16-bit relocations.  The 32-bit relocation
 
 /* The Motorola 68HC11 microcontroler only addresses 64Kb.
    We must handle 8 and 16-bit relocations.  The 32-bit relocation
index a61b09d415258967e2bb0ce8fae66280186527ec..39219e94b090a848f3362b87f3084841d5771a36 100644 (file)
@@ -38,7 +38,7 @@ static bfd_reloc_status_type  or32_elf_jumptarg_reloc          PARAMS ((bfd *, a
 
 /* Try to minimize the amount of space occupied by relocation tables
    on the ROM (not that the ROM won't be swamped by other ELF overhead).  */
 
 /* Try to minimize the amount of space occupied by relocation tables
    on the ROM (not that the ROM won't be swamped by other ELF overhead).  */
-#define USE_REL
+#define USE_REL        1
 
 static reloc_howto_type elf_or32_howto_table[] =
 {
 
 static reloc_howto_type elf_or32_howto_table[] =
 {
index 56c15c010cc6b1aec005fbb6718989b435d60609..bd34a14d2582e64323a4ceca80570e77d96e0188 100644 (file)
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for ARM new abi option.
 /* 32-bit ELF support for ARM new abi option.
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -27,7 +27,7 @@
 #define NUM_ELEM(a)  (sizeof (a) / (sizeof (a)[0]))
 #endif
 
 #define NUM_ELEM(a)  (sizeof (a) / (sizeof (a)[0]))
 #endif
 
-#define USE_REL
+#define USE_REL        1
 
 #define TARGET_LITTLE_SYM               bfd_elf32_littlearm_vec
 #define TARGET_LITTLE_NAME              "elf32-littlearm"
 
 #define TARGET_LITTLE_SYM               bfd_elf32_littlearm_vec
 #define TARGET_LITTLE_NAME              "elf32-littlearm"
index 8da72568f27eb3f5c9f26d7a64601b3c1f008166..4f5b81c9757e2f821e0313c2b519ec187d3c51e7 100644 (file)
    For backwards compatibility, we still support this usage.  */
 #ifndef USE_REL
 #define USE_REL 0
    For backwards compatibility, we still support this usage.  */
 #ifndef USE_REL
 #define USE_REL 0
-#else
-#undef USE_REL
-#define USE_REL 1
 #endif
 
 /* Use these in new code.  */
 #endif
 
 /* Use these in new code.  */
This page took 0.040476 seconds and 4 git commands to generate.