gas/
2005-04-15 Jan Beulich <jbeulich@novell.com> * config/obj-elf.c (obj_elf_struct): New. (elf_pseudo_table). Use it for .offset and .struct. gas/testsuite/ 2005-04-15 Jan Beulich <jbeulich@novell.com> * gas/elf/struct.[sd]: New. * gas/elf/elf.exp: Run new test.
This commit is contained in:
parent
21bc75678f
commit
8fe53b44b2
|
@ -1,3 +1,8 @@
|
||||||
|
2005-04-15 Jan Beulich <jbeulich@novell.com>
|
||||||
|
|
||||||
|
* config/obj-elf.c (obj_elf_struct): New.
|
||||||
|
(elf_pseudo_table). Use it for .offset and .struct.
|
||||||
|
|
||||||
2005-04-14 Bob Wilson <bob.wilson@acm.org>
|
2005-04-14 Bob Wilson <bob.wilson@acm.org>
|
||||||
Sterling Augustine <sterling@tensilica.com>
|
Sterling Augustine <sterling@tensilica.com>
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ static void obj_elf_subsection (int);
|
||||||
static void obj_elf_popsection (int);
|
static void obj_elf_popsection (int);
|
||||||
static void obj_elf_tls_common (int);
|
static void obj_elf_tls_common (int);
|
||||||
static void obj_elf_lcomm (int);
|
static void obj_elf_lcomm (int);
|
||||||
|
static void obj_elf_struct (int);
|
||||||
|
|
||||||
static const pseudo_typeS elf_pseudo_table[] =
|
static const pseudo_typeS elf_pseudo_table[] =
|
||||||
{
|
{
|
||||||
|
@ -113,6 +114,8 @@ static const pseudo_typeS elf_pseudo_table[] =
|
||||||
|
|
||||||
/* We need to trap the section changing calls to handle .previous. */
|
/* We need to trap the section changing calls to handle .previous. */
|
||||||
{"data", obj_elf_data, 0},
|
{"data", obj_elf_data, 0},
|
||||||
|
{"offset", obj_elf_struct, 0},
|
||||||
|
{"struct", obj_elf_struct, 0},
|
||||||
{"text", obj_elf_text, 0},
|
{"text", obj_elf_text, 0},
|
||||||
|
|
||||||
{"tls_common", obj_elf_tls_common, 0},
|
{"tls_common", obj_elf_tls_common, 0},
|
||||||
|
@ -1036,6 +1039,24 @@ obj_elf_text (int i)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Change to the *ABS* section. */
|
||||||
|
|
||||||
|
void
|
||||||
|
obj_elf_struct (int i)
|
||||||
|
{
|
||||||
|
#ifdef md_flush_pending_output
|
||||||
|
md_flush_pending_output ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
previous_section = now_seg;
|
||||||
|
previous_subsection = now_subseg;
|
||||||
|
s_struct (i);
|
||||||
|
|
||||||
|
#ifdef md_elf_section_change_hook
|
||||||
|
md_elf_section_change_hook ();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
obj_elf_subsection (int ignore ATTRIBUTE_UNUSED)
|
obj_elf_subsection (int ignore ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2005-04-15 Jan Beulich <jbeulich@novell.com>
|
||||||
|
|
||||||
|
* gas/elf/struct.[sd]: New.
|
||||||
|
* gas/elf/elf.exp: Run new test.
|
||||||
|
|
||||||
2005-04-15 Alan Modra <amodra@bigpond.net.au>
|
2005-04-15 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* gas/all/assign.s: New.
|
* gas/all/assign.s: New.
|
||||||
|
|
|
@ -61,6 +61,7 @@ if { ([istarget "*-*-*elf*"]
|
||||||
run_dump_test "section3"
|
run_dump_test "section3"
|
||||||
run_dump_test "section4"
|
run_dump_test "section4"
|
||||||
run_list_test "section5" "" "-al" "-SW" "| grep \" \\\\.test\\\[0-9\\\]\""
|
run_list_test "section5" "" "-al" "-SW" "| grep \" \\\\.test\\\[0-9\\\]\""
|
||||||
|
run_dump_test "struct"
|
||||||
run_dump_test "symver"
|
run_dump_test "symver"
|
||||||
run_list_test "type" "" "" "-s" "| grep \"1 \\\[FONT\\\]\""
|
run_list_test "type" "" "" "-s" "| grep \"1 \\\[FONT\\\]\""
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#nm: --extern-only
|
||||||
|
#name: struct
|
||||||
|
|
||||||
|
# Test the .struct pseudo-op.
|
||||||
|
|
||||||
|
0+0 D l1
|
||||||
|
0+4 D l2
|
||||||
|
0+1 A w1
|
||||||
|
0+3 A w2
|
||||||
|
0+5 A w3
|
|
@ -0,0 +1,9 @@
|
||||||
|
.globl w1, w2, w3, l1, l2
|
||||||
|
.data
|
||||||
|
l1: .long 0
|
||||||
|
.struct 1
|
||||||
|
w1: .short 0
|
||||||
|
w2: .short 0
|
||||||
|
w3: .short 0
|
||||||
|
.previous
|
||||||
|
l2: .long 0
|
Loading…
Reference in New Issue