From 34f708754e8396d5ae952c55db1d6e313e889d61 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 29 Jul 2003 02:03:33 +0000 Subject: [PATCH] gas/ 2003-07-28 H.J. Lu * config/obj-elf.c (obj_elf_section_type): Also accept "note". gas/testsuite/ 2003-07-28 H.J. Lu * gas/elf/elf.exp: Add section3 for note section. * gas/elf/section3.d: New file. * gas/elf/section3.s: Likewise. --- gas/ChangeLog | 4 ++++ gas/config/obj-elf.c | 2 ++ gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/elf/elf.exp | 1 + gas/testsuite/gas/elf/section3.d | 6 ++++++ gas/testsuite/gas/elf/section3.s | 2 ++ 6 files changed, 22 insertions(+) create mode 100644 gas/testsuite/gas/elf/section3.d create mode 100644 gas/testsuite/gas/elf/section3.s diff --git a/gas/ChangeLog b/gas/ChangeLog index c5d20f3..355e3f4 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2003-07-28 H.J. Lu + + * config/obj-elf.c (obj_elf_section_type): Also accept "note". + 2003-07-28 Rainer Orth * read.c (s_space): Don't warn about .space 0. diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 8687965..7a2ad34 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -844,6 +844,8 @@ obj_elf_section_type (str, len) return SHT_PROGBITS; if (len == 6 && strncmp (str, "nobits", 6) == 0) return SHT_NOBITS; + if (len == 4 && strncmp (str, "note", 4) == 0) + return SHT_NOTE; #ifdef md_elf_section_type { diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 46ca5dc..1a0af90 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2003-07-28 H.J. Lu + + * gas/elf/elf.exp: Add section3 for note section. + + * gas/elf/section3.d: New file. + * gas/elf/section3.s: Likewise. + 2003-07-26 Alan Modra * gas/ppc/altivec.d: Update. diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index f9777a1..8edd2de 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -54,6 +54,7 @@ if { ([istarget "*-*-elf*"] run_dump_test "section0" run_dump_test "section1" run_list_test "section2" "$target_machine" "-al" "" + run_dump_test "section3" run_dump_test "symver" run_list_test "type" "" "" "| grep \"1 \\\[FONT\\\]\"" } diff --git a/gas/testsuite/gas/elf/section3.d b/gas/testsuite/gas/elf/section3.d new file mode 100644 index 0000000..4a201c3 --- /dev/null +++ b/gas/testsuite/gas/elf/section3.d @@ -0,0 +1,6 @@ +#readelf: -S +#name: note section + +#... +[ ]*\[.*\][ ]+\.foo[ ]+NOTE.* +#pass diff --git a/gas/testsuite/gas/elf/section3.s b/gas/testsuite/gas/elf/section3.s new file mode 100644 index 0000000..dd9a79e --- /dev/null +++ b/gas/testsuite/gas/elf/section3.s @@ -0,0 +1,2 @@ + .section .foo,"","note" + .byte 0,0,0,0 -- 2.7.4