This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
.previous
- To: binutils at sourceware dot cygnus dot com
- Subject: .previous
- From: Philip Blundell <pb at futuretv dot com>
- Date: Mon, 20 Dec 1999 14:10:56 +0000
On an ARM ELF target, GAS does not currently accept:
.data
.word 0
.previous
The reason is that tc-arm.c has its own hooks for .data and .text; these
override the ones in obj-elf.c and so the code to store the old sections never
gets called. The patch below seems to fix this for me.
Also, as far as I can tell, no ELF target accepts that construct with `.bss'
instead of `.data', because the necessary hooks are missing altogether.
Thanks
p.
1999-12-20 Philip Blundell <pb@futuretv.com>
* config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate
hook function when changing sections.
(arm_s_data): Likewise.
Index: tc-arm.c
===================================================================
RCS file: /cvs/binutils/binutils/gas/config/tc-arm.c,v
retrieving revision 1.25
diff -u -r1.25 tc-arm.c
--- tc-arm.c 1999/10/28 03:03:53 1.25
+++ tc-arm.c 1999/12/20 14:09:31
@@ -1373,7 +1373,11 @@
if (now_seg != text_section)
s_ltorg (0);
+#ifdef OBJ_ELF
+ obj_elf_text (ignore);
+#else
s_text (ignore);
+#endif
}
static void
@@ -1388,7 +1392,11 @@
else if (now_seg != data_section)
s_ltorg (0);
+#ifdef OBJ_ELF
+ obj_elf_data (ignore);
+#else
s_data (ignore);
+#endif
}
#ifdef OBJ_ELF