aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2003-05-02 02:46:36 +0000
committerH.J. Lu <hjl.tools@gmail.com>2003-05-02 02:46:36 +0000
commit612d7b83dd2280df7aa167e104fc809983efe16c (patch)
treeb0fabf22bceced63e3dce8b8243841dd36e43066 /gas
parent395f4d9b6a84690e5901e0580ff17241ca9fc01a (diff)
downloadgdb-612d7b83dd2280df7aa167e104fc809983efe16c.zip
gdb-612d7b83dd2280df7aa167e104fc809983efe16c.tar.gz
gdb-612d7b83dd2280df7aa167e104fc809983efe16c.tar.bz2
gas/
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/obj-elf.c3
-rw-r--r--gas/config/tc-ia64.h1
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/ia64/ia64.exp1
-rw-r--r--gas/testsuite/gas/ia64/secname.d28
-rw-r--r--gas/testsuite/gas/ia64/secname.s2
7 files changed, 50 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c868802..c609b0e 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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.
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 7c2423c..f61285a 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -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 ();
diff --git a/gas/config/tc-ia64.h b/gas/config/tc-ia64.h
index b79cfcc..20940c0 100644
--- a/gas/config/tc-ia64.h
+++ b/gas/config/tc-ia64.h
@@ -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)
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 6399b50..348d243 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -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.
diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp
index 60e6a8e..57c0e38 100644
--- a/gas/testsuite/gas/ia64/ia64.exp
+++ b/gas/testsuite/gas/ia64/ia64.exp
@@ -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
index 0000000..227a2ea
--- /dev/null
+++ b/gas/testsuite/gas/ia64/secname.d
@@ -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
index 0000000..42e21b6
--- /dev/null
+++ b/gas/testsuite/gas/ia64/secname.s
@@ -0,0 +1,2 @@
+ .section .foo#,"aw","progbits"
+ data8 1234