aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-10-01 12:59:42 +0000
committerNick Clifton <nickc@redhat.com>2004-10-01 12:59:42 +0000
commit40a18ebd3ae910042b4d7bf053a41c247db7cbc1 (patch)
treecd1e24028a8d52668bd1579632901934575f3d52 /gas
parent14127cc4f2b98a818bef55c977eb3ea11b0ba5ce (diff)
downloadbinutils-40a18ebd3ae910042b4d7bf053a41c247db7cbc1.zip
binutils-40a18ebd3ae910042b4d7bf053a41c247db7cbc1.tar.gz
binutils-40a18ebd3ae910042b4d7bf053a41c247db7cbc1.tar.bz2
The patch below adds binutils support for the SHT_ARM_EXIDX, as defined by
the ARM EABI.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-arm.c14
-rw-r--r--gas/config/tc-arm.h3
3 files changed, 24 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c328820..3f8fff4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2004-10-01 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_elf_section_type): New function.
+ (arm_elf_change_section): Set section link for exidx sections.
+ * config/tc-arm.h (arm_elf_section_type): Add prototype.
+ (md_elf_section_type): Define.
+
2004-10-01 Bill Farmer <Bill@the-farmers.freeserve.co.uk>
* config/tc-pdp11.c (md_apply_fix3): Change to sign of the SOB
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 752cd3c..9770ccd 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -1338,6 +1338,11 @@ arm_elf_change_section (void)
{
flagword flags;
+ /* Link an unlinked unwind index table section to the .text section. */
+ if (elf_section_type (now_seg) == SHT_ARM_EXIDX
+ && elf_linked_to_section (now_seg) == NULL)
+ elf_linked_to_section (now_seg) = text_section;
+
if (!SEG_NORMAL (now_seg))
return;
@@ -1349,6 +1354,15 @@ arm_elf_change_section (void)
mapstate = seg_info (now_seg)->tc_segment_info_data;
}
+
+int
+arm_elf_section_type (const char * str, size_t len)
+{
+ if (len == 5 && strncmp (str, "exidx", 5) == 0)
+ return SHT_ARM_EXIDX;
+
+ return -1;
+}
#else
#define mapping_state(a)
#endif /* OBJ_ELF */
diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h
index 4e791a0..fb8ca8d 100644
--- a/gas/config/tc-arm.h
+++ b/gas/config/tc-arm.h
@@ -167,6 +167,7 @@ struct fix;
# define DWARF2_LINE_MIN_INSN_LENGTH 2
# define obj_frob_symbol(sym, punt) armelf_frob_symbol ((sym), & (punt))
# 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 enum mstate
@@ -209,3 +210,5 @@ extern void cons_fix_new_arm (fragS *, int, int, expressionS *);
extern void arm_init_frag (struct frag *);
extern void arm_handle_align (struct frag *);
extern bfd_boolean arm_fix_adjustable (struct fix *);
+extern int arm_elf_section_type (const char *, size_t);
+