This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Thumb32 assembler (64/69)


Add BFD_RELOC_ constants for the new relocations, and prune a couple
that are never used.

bfd:
	* reloc.c: Reorganize ARM relocations.  Remove from the
	assembler-only section all relocations that do in fact appear in
	object files.  Document more relocations.
	(BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY): Delete - never generated.
	* bfd-in2.h, libbfd.h: Regenerate.
	* elf32-arm.c: Remove reference to BFD_RELOC_ARM_COPY.
gas:
	* config/tc-arm.h: Remove reference to BFD_RELOC_ARM_GOT12.

===================================================================
Index: gas/config/tc-arm.h
--- gas/config/tc-arm.h	(revision 74)
+++ gas/config/tc-arm.h	(revision 75)
@@ -140,7 +140,6 @@
 #define TC_FORCE_RELOCATION_LOCAL(FIX)			\
   (!(FIX)->fx_pcrel					\
    || (FIX)->fx_plt					\
-   || (FIX)->fx_r_type == BFD_RELOC_ARM_GOT12		\
    || (FIX)->fx_r_type == BFD_RELOC_ARM_GOT32		\
    || (FIX)->fx_r_type == BFD_RELOC_32			\
    || TC_FORCE_RELOCATION (FIX))
===================================================================
Index: bfd/reloc.c
--- bfd/reloc.c	(revision 74)
+++ bfd/reloc.c	(revision 75)
@@ -2623,12 +2623,90 @@
   not stored in the instruction.  The 2nd lowest bit comes from a 1 bit
   field in the instruction.
 ENUM
+  BFD_RELOC_THUMB_PCREL_BRANCH9
+ENUMX
+  BFD_RELOC_THUMB_PCREL_BRANCH12
+ENUMX
+  BFD_RELOC_THUMB_PCREL_BRANCH23
+ENUMDOC
+  Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
+  be zero and is not stored in the instruction.
+
+ENUM
+  BFD_RELOC_ARM_OFFSET_IMM
+ENUMDOC
+  12-bit immediate offset, used in ARM-format ldr and str instructions.
+
+ENUM
+  BFD_RELOC_ARM_THUMB_OFFSET
+ENUMDOC
+  5-bit immediate offset, used in Thumb-format ldr and str instructions.
+
+ENUM
+  BFD_RELOC_ARM_TARGET1
+ENUMDOC
+  Pc-relative or absolute relocation depending on target.  Used for
+  entries in .init_array sections.
+ENUM
+  BFD_RELOC_ARM_ROSEGREL32
+ENUMDOC
+  Read-only segment base relative address.
+ENUM
+  BFD_RELOC_ARM_SBREL32
+ENUMDOC
+  Data segment base relative address.
+ENUM
+  BFD_RELOC_ARM_TARGET2
+ENUMDOC
+  This reloc is used for references to RTTI data from exception handling
+  tables.  The actual definition depends on the target.  It may be a
+  pc-relative or some form of GOT-indirect relocation.
+ENUM
+  BFD_RELOC_ARM_PREL31
+ENUMDOC
+  31-bit PC relative address.
+
+ENUM
+  BFD_RELOC_ARM_JUMP_SLOT
+ENUMX
+  BFD_RELOC_ARM_GLOB_DAT
+ENUMX
+  BFD_RELOC_ARM_GOT32
+ENUMX
+  BFD_RELOC_ARM_PLT32
+ENUMX
+  BFD_RELOC_ARM_RELATIVE
+ENUMX
+  BFD_RELOC_ARM_GOTOFF
+ENUMX
+  BFD_RELOC_ARM_GOTPC
+ENUMDOC
+  Relocations for setting up GOTs and PLTs for shared libraries.
+
+ENUM
+  BFD_RELOC_ARM_TLS_GD32
+ENUMX
+  BFD_RELOC_ARM_TLS_LDO32
+ENUMX
+  BFD_RELOC_ARM_TLS_LDM32
+ENUMX
+  BFD_RELOC_ARM_TLS_DTPOFF32
+ENUMX
+  BFD_RELOC_ARM_TLS_DTPMOD32
+ENUMX
+  BFD_RELOC_ARM_TLS_TPOFF32
+ENUMX
+  BFD_RELOC_ARM_TLS_IE32
+ENUMX
+  BFD_RELOC_ARM_TLS_LE32
+ENUMDOC
+  ARM thread-local storage relocations.
+  
+ENUM
   BFD_RELOC_ARM_IMMEDIATE
 ENUMX
   BFD_RELOC_ARM_ADRL_IMMEDIATE
 ENUMX
-  BFD_RELOC_ARM_OFFSET_IMM
-ENUMX
   BFD_RELOC_ARM_SHIFT_IMM
 ENUMX
   BFD_RELOC_ARM_SMI
@@ -2658,68 +2736,9 @@
   BFD_RELOC_ARM_THUMB_IMM
 ENUMX
   BFD_RELOC_ARM_THUMB_SHIFT
-ENUMX
-  BFD_RELOC_ARM_THUMB_OFFSET
-ENUMX
-  BFD_RELOC_ARM_GOT12
-ENUMX
-  BFD_RELOC_ARM_GOT32
-ENUMX
-  BFD_RELOC_ARM_JUMP_SLOT
-ENUMX
-  BFD_RELOC_ARM_COPY
-ENUMX
-  BFD_RELOC_ARM_GLOB_DAT
-ENUMX
-  BFD_RELOC_ARM_PLT32
-ENUMX
-  BFD_RELOC_ARM_RELATIVE
-ENUMX
-  BFD_RELOC_ARM_GOTOFF
-ENUMX
-  BFD_RELOC_ARM_GOTPC
-ENUMX
-  BFD_RELOC_ARM_TLS_GD32
-ENUMX
-  BFD_RELOC_ARM_TLS_LDO32
-ENUMX
-  BFD_RELOC_ARM_TLS_LDM32
-ENUMX
-  BFD_RELOC_ARM_TLS_DTPOFF32
-ENUMX
-  BFD_RELOC_ARM_TLS_DTPMOD32
-ENUMX
-  BFD_RELOC_ARM_TLS_TPOFF32
-ENUMX
-  BFD_RELOC_ARM_TLS_IE32
-ENUMX
-  BFD_RELOC_ARM_TLS_LE32
 ENUMDOC
   These relocs are only used within the ARM assembler.  They are not
   (at present) written to any object files.
-ENUM
-  BFD_RELOC_ARM_TARGET1
-ENUMDOC
-  Pc-relative or absolute relocation depending on target.  Used for
-  entries in .init_array sections.
-ENUM
-  BFD_RELOC_ARM_ROSEGREL32
-ENUMDOC
-  Read-only segment base relative address.
-ENUM
-  BFD_RELOC_ARM_SBREL32
-ENUMDOC
-  Data segment base relative address.
-ENUM
-  BFD_RELOC_ARM_TARGET2
-ENUMDOC
-  This reloc is used for References to RTTI dta from exception handling
-  tables.  The actual definition depends on the target.  It may be a
-  pc-relative or some form of GOT-indirect relocation.
-ENUM
-  BFD_RELOC_ARM_PREL31
-ENUMDOC
-  31-bit PC relative address.
 
 ENUM
   BFD_RELOC_SH_PCDISP8BY2
@@ -2905,16 +2924,6 @@
   Renesas / SuperH SH relocs.  Not all of these appear in object files.
 
 ENUM
-  BFD_RELOC_THUMB_PCREL_BRANCH9
-ENUMX
-  BFD_RELOC_THUMB_PCREL_BRANCH12
-ENUMX
-  BFD_RELOC_THUMB_PCREL_BRANCH23
-ENUMDOC
-  Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
-  be zero and is not stored in the instruction.
-
-ENUM
   BFD_RELOC_ARC_B22_PCREL
 ENUMDOC
   ARC Cores relocs.
===================================================================
Index: bfd/elf32-arm.c
--- bfd/elf32-arm.c	(revision 74)
+++ bfd/elf32-arm.c	(revision 75)
@@ -1315,7 +1315,6 @@
     {BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_CALL},
     {BFD_RELOC_THUMB_PCREL_BRANCH12, R_ARM_THM_JUMP11},
     {BFD_RELOC_THUMB_PCREL_BRANCH9,  R_ARM_THM_JUMP8},
-    {BFD_RELOC_ARM_COPY,             R_ARM_COPY},
     {BFD_RELOC_ARM_GLOB_DAT,         R_ARM_GLOB_DAT},
     {BFD_RELOC_ARM_JUMP_SLOT,        R_ARM_JUMP_SLOT},
     {BFD_RELOC_ARM_RELATIVE,         R_ARM_RELATIVE},

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]