]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas/
authorDaniel Jacobowitz <drow@false.org>
Thu, 15 Mar 2007 12:11:50 +0000 (12:11 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 15 Mar 2007 12:11:50 +0000 (12:11 +0000)
* 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.

gas/ChangeLog
gas/config/tc-arm.c
gas/config/tc-arm.h
gas/symbols.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/thumbver.d [new file with mode: 0644]
gas/testsuite/gas/arm/thumbver.s [new file with mode: 0644]

index 4c212dbaaf25ed9808f05040cd8f89aa70cc7541..4ee657048a19ee4fb9dfa03ab4d1d97995edcff8 100644 (file)
@@ -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.
index 9822ab53e79cb72e0bd6b52bc957f67ee989d519..b463d9615bde0c28068e5ac756a454910fc3e647 100644 (file)
@@ -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);
+}
index d7df2136eccb00d3ef019602e79c4719d44e477c..d6dee9b1a9aa5031c15a8c538c1f962c3d224468 100644 (file)
@@ -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 ()
index 5cad5c8ef62800fa903f738bd188415379260130..2e098f1f6d13203e8e6556f706bc77b28369acc6 100644 (file)
@@ -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
index a498537e66663640116ef7cbdfd98588d9c7b7fb..e6a5da4caac4ed4a48ee63d10e4f56b6e04f5704 100644 (file)
@@ -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 (file)
index 0000000..ddc46df
--- /dev/null
@@ -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 (file)
index 0000000..ad81395
--- /dev/null
@@ -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