gas/
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 2 May 2003 02:46:36 +0000 (02:46 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 2 May 2003 02:46:36 +0000 (02:46 +0000)
2003-05-01  H.J. Lu <hjl@gnu.org>

* config/tc-ia64.h (tc_canonicalize_section_name): New.

* config/obj-elf.c (obj_elf_section_name): Call
tc_canonicalize_section_name if it is defined.

gas/testsuite/

2003-05-01  H.J. Lu <hjl@gnu.org>

* gas/ia64/ia64.exp: Add secname.

* gas/ia64/secname.s: New. Test the trailing '#' in section
name.
* gas/ia64/secname.d: Likewise.

gas/ChangeLog
gas/config/obj-elf.c
gas/config/tc-ia64.h
gas/testsuite/ChangeLog
gas/testsuite/gas/ia64/ia64.exp
gas/testsuite/gas/ia64/secname.d [new file with mode: 0644]
gas/testsuite/gas/ia64/secname.s [new file with mode: 0644]

index c868802..c609b0e 100644 (file)
@@ -1,5 +1,12 @@
 2003-05-01  H.J. Lu <hjl@gnu.org>
 
+       * config/tc-ia64.h (tc_canonicalize_section_name): New.
+
+       * config/obj-elf.c (obj_elf_section_name): Call
+       tc_canonicalize_section_name if it is defined.
+
+2003-05-01  H.J. Lu <hjl@gnu.org>
+
        * config/tc-ia64.c (ia64_check_label): New.
        * config/tc-ia64.h (tc_check_label): New.
 
index 7c2423c..f61285a 100644 (file)
@@ -940,6 +940,9 @@ obj_elf_section_name ()
       name = xmalloc (end - input_line_pointer + 1);
       memcpy (name, input_line_pointer, end - input_line_pointer);
       name[end - input_line_pointer] = '\0';
+#ifdef tc_canonicalize_section_name
+      name = tc_canonicalize_section_name (name);
+#endif
       input_line_pointer = end;
     }
   SKIP_WHITESPACE ();
index b79cfcc..20940c0 100644 (file)
@@ -114,6 +114,7 @@ extern void ia64_check_label PARAMS ((symbolS *));
 #define md_flush_pending_output()      ia64_flush_pending_output ()
 #define md_parse_name(s,e,c)           ia64_parse_name (s, e)
 #define tc_canonicalize_symbol_name(s) ia64_canonicalize_symbol_name (s)
+#define tc_canonicalize_section_name(s)        ia64_canonicalize_symbol_name (s)
 #define md_optimize_expr(l,o,r)                ia64_optimize_expr (l, o, r)
 #define md_cons_align(n)               ia64_cons_align (n)
 #define TC_FORCE_RELOCATION(f)         ia64_force_relocation (f)
index 6399b50..348d243 100644 (file)
@@ -1,5 +1,13 @@
 2003-05-01  H.J. Lu <hjl@gnu.org>
 
+       * gas/ia64/ia64.exp: Add secname.
+
+       * gas/ia64/secname.s: New. Test the trailing '#' in section
+       name.
+       * gas/ia64/secname.d: Likewise.
+
+2003-05-01  H.J. Lu <hjl@gnu.org>
+
        * gas/ia64/ia64.exp: Add "global".
 
        * gas/ia64/global.d: New file.
index 60e6a8e..57c0e38 100644 (file)
@@ -46,4 +46,5 @@ if [istarget "ia64-*"] then {
     run_dump_test "align"
     run_dump_test "order"
     run_dump_test "global"
+    run_dump_test "secname"
 }
diff --git a/gas/testsuite/gas/ia64/secname.d b/gas/testsuite/gas/ia64/secname.d
new file mode 100644 (file)
index 0000000..227a2ea
--- /dev/null
@@ -0,0 +1,28 @@
+#readelf: -S
+#name: ia64 section name
+
+There are 8 section headers, starting at offset 0x80:
+
+Section Headers:
+  \[Nr\] Name              Type             Address           Offset
+       Size              EntSize          Flags  Link  Info  Align
+  \[ 0\]                   NULL             0000000000000000  00000000
+       0000000000000000  0000000000000000           0     0     0
+  \[ 1\] \.text             PROGBITS         0000000000000000  00000040
+       0000000000000000  0000000000000000  AX       0     0     16
+  \[ 2\] \.data             PROGBITS         0000000000000000  00000040
+       0000000000000000  0000000000000000  WA       0     0     1
+  \[ 3\] \.bss              NOBITS           0000000000000000  00000040
+       0000000000000000  0000000000000000  WA       0     0     1
+  \[ 4\] \.foo              PROGBITS         0000000000000000  00000040
+       0000000000000008  0000000000000000  WA       0     0     8
+  \[ 5\] \.shstrtab         STRTAB           0000000000000000  00000048
+       0000000000000031  0000000000000000           0     0     1
+  \[ 6\] \.symtab           SYMTAB           0000000000000000  00000280
+       0000000000000078  0000000000000018           7     5     8
+  \[ 7\] \.strtab           STRTAB           0000000000000000  000002f8
+       0000000000000001  0000000000000000           0     0     1
+Key to Flags:
+  W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\)
+  I \(info\), L \(link order\), G \(group\), x \(unknown\)
+  O \(extra OS processing required\) o \(OS specific\), p \(processor specific\)
diff --git a/gas/testsuite/gas/ia64/secname.s b/gas/testsuite/gas/ia64/secname.s
new file mode 100644 (file)
index 0000000..42e21b6
--- /dev/null
@@ -0,0 +1,2 @@
+       .section .foo#,"aw","progbits"
+       data8 1234