aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2005-06-07 18:03:17 +0000
committerZack Weinberg <zackw@panix.com>2005-06-07 18:03:17 +0000
commit05ab1f3b1c6eb9377b0ea51ded17c95e59fb25dc (patch)
tree15109d018d9b773139da87140ab79c4f7733e240 /gas/config
parent55cf6793d851ffd0f14d851eb6d75cac2fe400ff (diff)
downloadgdb-05ab1f3b1c6eb9377b0ea51ded17c95e59fb25dc.zip
gdb-05ab1f3b1c6eb9377b0ea51ded17c95e59fb25dc.tar.gz
gdb-05ab1f3b1c6eb9377b0ea51ded17c95e59fb25dc.tar.bz2
Revert accidental commit
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c24
-rw-r--r--gas/config/tc-arm.h6
2 files changed, 16 insertions, 14 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 5e7fb74..a3cc432 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -1414,11 +1414,9 @@ find_real_start (symbolS * symbolP)
if (name == NULL)
abort ();
- /* The compiler may generate BL instructions to local labels because
- it needs to perform a branch to a far away location. These labels
- do not have a corresponding ".real_start_of" label. To accomodate
- hand-written assembly, we don't insist on a leading ".L", just a
- leading dot. */
+ /* Names that start with '.' are local labels, not function entry points.
+ The compiler may generate BL instructions to these labels because it
+ needs to perform a branch to a far away location. */
if (name[0] == '.')
return symbolP;
@@ -10515,8 +10513,7 @@ md_apply_fix (fixS * fixP,
#define SEXT24(x) ((((x) & 0xffffff) ^ (~ 0x7fffff)) + 0x800000)
#ifdef OBJ_ELF
- if (!fixP->fx_done)
- value = fixP->fx_offset;
+ value = fixP->fx_offset;
#endif
/* We are going to store value (shifted right by two) in the
@@ -10586,8 +10583,7 @@ md_apply_fix (fixS * fixP,
newval = md_chars_to_number (buf, INSN_SIZE);
#ifdef OBJ_ELF
- if (!fixP->fx_done)
- value = fixP->fx_offset;
+ value = fixP->fx_offset;
#endif
hbit = (value >> 1) & 1;
value = (value >> 2) & 0x00ffffff;
@@ -10746,8 +10742,7 @@ md_apply_fix (fixS * fixP,
if (diff & 0x400000)
diff |= ~0x3fffff;
#ifdef OBJ_ELF
- if (!fixP->fx_done)
- value = fixP->fx_offset;
+ value = fixP->fx_offset;
#endif
value += diff;
@@ -11358,6 +11353,13 @@ arm_force_relocation (struct fix * fixp)
if (fixp->fx_r_type == BFD_RELOC_RVA)
return 1;
#endif
+#ifdef OBJ_ELF
+ if (fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH
+ || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BLX
+ || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX
+ || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23)
+ return 1;
+#endif
/* Resolve these relocations even if the symbol is extern or weak. */
if (fixp->fx_r_type == BFD_RELOC_ARM_IMMEDIATE
diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h
index de23b62..09a49ad 100644
--- a/gas/config/tc-arm.h
+++ b/gas/config/tc-arm.h
@@ -127,9 +127,8 @@ struct fix;
#define OPTIONAL_REGISTER_PREFIX '%'
-#define LOCAL_LABEL(name) (name[0] == '.' && name[1] == 'L')
-#define LOCAL_LABELS_FB 1
-#define LOCAL_LABEL_PREFIX '.'
+#define LOCAL_LABEL(name) (name[0] == '.' && (name[1] == 'L'))
+#define LOCAL_LABELS_FB 1
/* This expression evaluates to true if the relocation is for a local
object for which we still want to do the relocation at runtime.
@@ -169,6 +168,7 @@ struct fix;
# define md_elf_section_change_hook() arm_elf_change_section ()
# define md_elf_section_type(str, len) arm_elf_section_type (str, len)
# define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
+# define LOCAL_LABEL_PREFIX '.'
# define TC_SEGMENT_INFO_TYPE struct arm_segment_info_type
enum mstate