diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2004-04-27 03:59:09 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2004-04-27 03:59:09 +0000 |
commit | f5842774f486e7b1ab16ea48325410afc73476f6 (patch) | |
tree | 400cd0b03335e52109f956ef807a49d06c123f57 /gas | |
parent | 1829f4b2af96932cb1c6aeca4815c7c5dd706f3d (diff) | |
download | gdb-f5842774f486e7b1ab16ea48325410afc73476f6.zip gdb-f5842774f486e7b1ab16ea48325410afc73476f6.tar.gz gdb-f5842774f486e7b1ab16ea48325410afc73476f6.tar.bz2 |
binutils/
2004-04-26 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (do_section_groups): New.
(options): Add --section-groups/-g.
(usage): Mention --section-groups/-g.
(parse_args): Support --section-groups/-g.
(get_group_flags): New.
(process_section_groups): New.
(process_object): Call process_section_groups.
gas/
2004-04-26 H.J. Lu <hongjiu.lu@intel.com>
* config/obj-elf.c (obj_elf_change_section): Check if the old
group name is NULL before comparison.
gas/testsuite/
2004-04-26 H.J. Lu <hongjiu.lu@intel.com>
* gas/elf/elf.exp: Add group0a, group0b and group1 for section
group.
* gas/elf/group0.s: New file.
* gas/elf/group0a.d: Likewise.
* gas/elf/group0b.d: Likewise.
* gas/elf/group1.e: Likewise.
* gas/elf/group1.s: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 3 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/elf.exp | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/group0.s | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/group0a.d | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/group0b.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/group1.e | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/group1.s | 2 |
9 files changed, 53 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 7a4f663..08a4750 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2004-04-26 H.J. Lu <hongjiu.lu@intel.com> + + * config/obj-elf.c (obj_elf_change_section): Check if the old + group name is NULL before comparison. + 2004-04-23 Chris Demetriou <cgd@broadcom.com> * config/tc-mips.h (mips_dwarf2_addr_size): Prototype. diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 14d48f2..e5f3ce3 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -645,7 +645,8 @@ obj_elf_change_section (const char *name, if ((flags & SEC_MERGE) && old_sec->entsize != (unsigned) entsize) as_warn (_("ignoring changed section entity size for %s"), name); if ((attr & SHF_GROUP) != 0 - && strcmp (elf_group_name (old_sec), group_name) != 0) + && (elf_group_name (old_sec) == NULL + || strcmp (elf_group_name (old_sec), group_name) != 0)) as_warn (_("ignoring new section group for %s"), name); } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 31e854d..9ec1aff 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2004-04-26 H.J. Lu <hongjiu.lu@intel.com> + + * gas/elf/elf.exp: Add group0a, group0b and group1 for section + group. + + * gas/elf/group0.s: New file. + * gas/elf/group0a.d: Likewise. + * gas/elf/group0b.d: Likewise. + * gas/elf/group1.e: Likewise. + * gas/elf/group1.s: Likewise. + 2004-04-23 Nick Clifton <nickc@redhat.com> * gas/symver/symver1.d: Cope with extra symbols inserted by diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index f427482..e087fba 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -48,6 +48,9 @@ if { ([istarget "*-*-elf*"] set target_machine -m32r } run_dump_test "ehopt0" + run_dump_test "group0a" + run_dump_test "group0b" + run_list_test "group1" "" "" "" run_dump_test "section0" run_dump_test "section1" run_list_test "section2" "$target_machine" "-al" "" diff --git a/gas/testsuite/gas/elf/group0.s b/gas/testsuite/gas/elf/group0.s new file mode 100644 index 0000000..26bdda2 --- /dev/null +++ b/gas/testsuite/gas/elf/group0.s @@ -0,0 +1,4 @@ + .section .foo,"axG",@progbits,.foo_group,comdat + .byte 1 + .section .bar,"aG",@progbits,.foo_group,comdat + .byte 1 diff --git a/gas/testsuite/gas/elf/group0a.d b/gas/testsuite/gas/elf/group0a.d new file mode 100644 index 0000000..9b2b967 --- /dev/null +++ b/gas/testsuite/gas/elf/group0a.d @@ -0,0 +1,9 @@ +#readelf: -SW +#name: group section +#source: group0.s + +#... +[ ]*\[.*\][ ]+\.foo[ ]+PROGBITS.*[ ]+AXG[ ]+.* +[ ]*\[.*\][ ]+\.bar[ ]+PROGBITS.*[ ]+AG[ ]+.* +[ ]*\[.*\][ ]+\.foo_group[ ]+GROUP.* +#pass diff --git a/gas/testsuite/gas/elf/group0b.d b/gas/testsuite/gas/elf/group0b.d new file mode 100644 index 0000000..847a86b --- /dev/null +++ b/gas/testsuite/gas/elf/group0b.d @@ -0,0 +1,10 @@ +#readelf: -g +#name: group section +#source: group0.s + +#... +COMDAT group section `.foo_group' \[.foo_group\] contains 2 sections: +[ ]+\[Index\][ ]+Name +[ ]+\[.*\][ ]+.foo +[ ]+\[.*\][ ]+.bar +#pass diff --git a/gas/testsuite/gas/elf/group1.e b/gas/testsuite/gas/elf/group1.e new file mode 100644 index 0000000..d4c4003 --- /dev/null +++ b/gas/testsuite/gas/elf/group1.e @@ -0,0 +1,7 @@ + +Symbol table '.symtab' contains 4 entries: + Num: Value[ ]* Size Type Bind Vis Ndx Name + 0: 0+0 0 NOTYPE LOCAL DEFAULT UND + 1: 0+0 0 SECTION LOCAL DEFAULT 1 + 2: 0+0 0 SECTION LOCAL DEFAULT 2 + 3: 0+0 0 SECTION LOCAL DEFAULT 3 diff --git a/gas/testsuite/gas/elf/group1.s b/gas/testsuite/gas/elf/group1.s new file mode 100644 index 0000000..1645f0b --- /dev/null +++ b/gas/testsuite/gas/elf/group1.s @@ -0,0 +1,2 @@ + .section .text,"axG",@progbits,.foo_group,comdat + .byte 1 |