aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-03-15 12:11:50 +0000
committerDaniel Jacobowitz <drow@false.org>2007-03-15 12:11:50 +0000
commit794ba86ab2c3af917bb30776338526a18ea74880 (patch)
tree283048e86c4b4da985dffe496b65f2b989fc4b31 /gas
parent4cbdee8aa5213d415babb7bc528d188066b4dfb1 (diff)
downloadgdb-794ba86ab2c3af917bb30776338526a18ea74880.zip
gdb-794ba86ab2c3af917bb30776338526a18ea74880.tar.gz
gdb-794ba86ab2c3af917bb30776338526a18ea74880.tar.bz2
gas/
* config/tc-arm.c (arm_copy_symbol_attributes): New. * config/tc-arm.h (arm_copy_symbol_attributes): Declare. (TC_COPY_SYMBOL_ATTRIBUTES): Define. * gas/symbols.c (copy_symbol_attributes): Use TC_COPY_SYMBOL_ATTRIBUTES. gas/testsuite/ * gas/arm/thumbver.d, gas/arm/thumbver.s: New test.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-arm.c6
-rw-r--r--gas/config/tc-arm.h6
-rw-r--r--gas/symbols.c4
-rw-r--r--gas/testsuite/ChangeLog4
-rw-r--r--gas/testsuite/gas/arm/thumbver.d15
-rw-r--r--gas/testsuite/gas/arm/thumbver.s9
7 files changed, 52 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4c212db..4ee6570 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2007-03-14 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config/tc-arm.c (arm_copy_symbol_attributes): New.
+ * config/tc-arm.h (arm_copy_symbol_attributes): Declare.
+ (TC_COPY_SYMBOL_ATTRIBUTES): Define.
+ * gas/symbols.c (copy_symbol_attributes): Use
+ TC_COPY_SYMBOL_ATTRIBUTES.
+
2007-03-14 Paul Brook <paul@codesourcery.com>
* config/tc-arm.c (T16_32_TAB): Fix dec_sp encoding.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 9822ab5..b463d96 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -20527,3 +20527,9 @@ s_arm_fpu (int ignored ATTRIBUTE_UNUSED)
ignore_rest_of_line ();
}
+/* Copy symbol information. */
+void
+arm_copy_symbol_attributes (symbolS *dest, symbolS *src)
+{
+ ARM_GET_FLAG (dest) = ARM_GET_FLAG (src);
+}
diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h
index d7df213..d6dee9b 100644
--- a/gas/config/tc-arm.h
+++ b/gas/config/tc-arm.h
@@ -141,6 +141,12 @@ bfd_boolean arm_is_eabi (void);
#define ARM_SET_INTERWORK(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_INTERWORK) : ARM_RESET_FLAG (s, ARM_FLAG_INTERWORK))
#define THUMB_SET_FUNC(s,t) ((t) ? ARM_SET_FLAG (s, THUMB_FLAG_FUNC) : ARM_RESET_FLAG (s, THUMB_FLAG_FUNC))
+void arm_copy_symbol_attributes (symbolS *, symbolS *);
+#ifndef TC_COPY_SYMBOL_ATTRIBUTES
+#define TC_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \
+ (arm_copy_symbol_attributes (DEST, SRC))
+#endif
+
#define TC_START_LABEL(C,STR) (c == ':' || (c == '/' && arm_data_in_code ()))
#define tc_canonicalize_symbol_name(str) arm_canonicalize_symbol_name (str);
#define obj_adjust_symtab() arm_adjust_symtab ()
diff --git a/gas/symbols.c b/gas/symbols.c
index 5cad5c8..2e098f1 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1947,6 +1947,10 @@ copy_symbol_attributes (symbolS *dest, symbolS *src)
#ifdef OBJ_COPY_SYMBOL_ATTRIBUTES
OBJ_COPY_SYMBOL_ATTRIBUTES (dest, src);
#endif
+
+#ifdef TC_COPY_SYMBOL_ATTRIBUTES
+ TC_COPY_SYMBOL_ATTRIBUTES (dest, src);
+#endif
}
int
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index a498537..e6a5da4 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-14 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * gas/arm/thumbver.d, gas/arm/thumbver.s: New test.
+
2007-03-14 Paul Brook <paul@codesourcery.com>
* gas/arm/thumb2_add.d: Add tests using sp.
diff --git a/gas/testsuite/gas/arm/thumbver.d b/gas/testsuite/gas/arm/thumbver.d
new file mode 100644
index 0000000..ddc46df
--- /dev/null
+++ b/gas/testsuite/gas/arm/thumbver.d
@@ -0,0 +1,15 @@
+# as: -meabi=4
+# readelf: -s
+# This test is only valid on ELF based ports.
+#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
+
+Symbol table '\.symtab' contains .* entries:
+ Num: Value Size Type Bind Vis Ndx Name
+ 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
+ 1: 00000000 0 SECTION LOCAL DEFAULT 1
+#...
+ .*: 00000001 0 FUNC LOCAL DEFAULT 1 a_alias
+ .*: 00000001 0 FUNC LOCAL DEFAULT 1 a_body
+ .*: 00000000 0 NOTYPE LOCAL DEFAULT 1 \$t
+ .*: 00000001 0 FUNC LOCAL DEFAULT 1 a_export@VERSION
+#...
diff --git a/gas/testsuite/gas/arm/thumbver.s b/gas/testsuite/gas/arm/thumbver.s
new file mode 100644
index 0000000..ad81395
--- /dev/null
+++ b/gas/testsuite/gas/arm/thumbver.s
@@ -0,0 +1,9 @@
+@ Check that symbols created by .symver are marked as Thumb.
+
+ .thumb_set a_alias, a_body
+ .symver a_alias, a_export@VERSION
+ .type a_body, %function
+ .code 16
+ .thumb_func
+a_body:
+ nop