GNU Binutils with patches for OS216
Revisão | ca9584fb9b4a54232d2538de9f75b1916bda00fe (tree) |
---|---|
Hora | 2015-10-29 22:58:16 |
Autor | Catherine Moore <clm@code...> |
Commiter | Catherine Moore |
2015-10-29 Catherine Moore <clm@codesourcery.com>
@@ -1,3 +1,8 @@ | ||
1 | +2015-10-29 Catherine Moore <clm@codesourcery.com> | |
2 | + | |
3 | + * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output | |
4 | + section to bfd_abs_section_ptr if the stub is discarded. | |
5 | + | |
1 | 6 | 2015-10-29 Ed Schouten <ed@nuxi.nl> |
2 | 7 | |
3 | 8 | * config.bfd (targ_defvec): Add support for CloudABI on aarch64. |
@@ -1707,6 +1707,7 @@ mips_elf_check_mips16_stubs (struct bfd_link_info *info, | ||
1707 | 1707 | h->fn_stub->flags &= ~SEC_RELOC; |
1708 | 1708 | h->fn_stub->reloc_count = 0; |
1709 | 1709 | h->fn_stub->flags |= SEC_EXCLUDE; |
1710 | + h->fn_stub->output_section = bfd_abs_section_ptr; | |
1710 | 1711 | } |
1711 | 1712 | |
1712 | 1713 | if (h->call_stub != NULL |
@@ -1719,6 +1720,7 @@ mips_elf_check_mips16_stubs (struct bfd_link_info *info, | ||
1719 | 1720 | h->call_stub->flags &= ~SEC_RELOC; |
1720 | 1721 | h->call_stub->reloc_count = 0; |
1721 | 1722 | h->call_stub->flags |= SEC_EXCLUDE; |
1723 | + h->call_stub->output_section = bfd_abs_section_ptr; | |
1722 | 1724 | } |
1723 | 1725 | |
1724 | 1726 | if (h->call_fp_stub != NULL |
@@ -1731,6 +1733,7 @@ mips_elf_check_mips16_stubs (struct bfd_link_info *info, | ||
1731 | 1733 | h->call_fp_stub->flags &= ~SEC_RELOC; |
1732 | 1734 | h->call_fp_stub->reloc_count = 0; |
1733 | 1735 | h->call_fp_stub->flags |= SEC_EXCLUDE; |
1736 | + h->call_fp_stub->output_section = bfd_abs_section_ptr; | |
1734 | 1737 | } |
1735 | 1738 | } |
1736 | 1739 |
@@ -1,3 +1,11 @@ | ||
1 | +2015-10-29 Catherine Moore <clm@codesourcery.com> | |
2 | + | |
3 | + * ld-mips-elf/mips16-fp-stub-1.s: New. | |
4 | + * ld-mips-elf/mips16-fp-stub-2.s: New. | |
5 | + * ld-mips-elf/mips16-fp-stub.d: New. | |
6 | + * ld-mips-elf/mips-elf.exp: Run new tests. | |
7 | + * ld-mips-elf/mips16-intermix.d: Update expected output. | |
8 | + | |
1 | 9 | 2015-10-28 H.J. Lu <hongjiu.lu@intel.com> |
2 | 10 | |
3 | 11 | PR ld/19162 |
@@ -666,6 +666,16 @@ run_ld_link_tests $mips16_intermix_test | ||
666 | 666 | |
667 | 667 | run_dump_test "mips16-local-stubs-1" |
668 | 668 | |
669 | +set mips16_fp_stub_test [list \ | |
670 | + [list "Floating-point stub for mips16 functions" \ | |
671 | + "$abi_ldflags(o32)" "" \ | |
672 | + "$abi_asflags(o32) -mips32r2" \ | |
673 | + {mips16-fp-stub-1.s mips16-fp-stub-2.s} \ | |
674 | + {{readelf --debug-dump=frames mips16-fp-stub.d}} \ | |
675 | + "mips16-fp-stub"]] | |
676 | + | |
677 | +run_ld_link_tests $mips16_fp_stub_test | |
678 | + | |
669 | 679 | set o32flagslist [list [list as $abi_asflags(o32)] [list ld $abi_ldflags(o32)]] |
670 | 680 | |
671 | 681 | foreach firstfpabi [list 0 1 2 3 4 5 6 7 ] { |
@@ -0,0 +1,58 @@ | ||
1 | + .file 1 "mips-fp-stub-1.c" | |
2 | + .section .mdebug.abi32 | |
3 | + .previous | |
4 | + .nan legacy | |
5 | + .module fp=32 | |
6 | + .module oddspreg | |
7 | + # Stub function to call float foo (float, float) | |
8 | + .section .mips16.call.fp.foo,"ax",@progbits | |
9 | + .align 2 | |
10 | + .set nomips16 | |
11 | + .set nomicromips | |
12 | + .ent __call_stub_fp_foo | |
13 | + .type __call_stub_fp_foo, @function | |
14 | +__call_stub_fp_foo: | |
15 | + .cfi_startproc | |
16 | + .cfi_def_cfa 29,-4 | |
17 | + .cfi_escape 0x16,29,1,0x6d | |
18 | + move $18,$31 | |
19 | + mtc1 $4,$f12 | |
20 | + mtc1 $5,$f14 | |
21 | + jal foo | |
22 | + .cfi_register 31,18 | |
23 | + mfc1 $2,$f0 | |
24 | + jr $18 | |
25 | + .cfi_endproc | |
26 | + .size __call_stub_fp_foo, .-__call_stub_fp_foo | |
27 | + .end __call_stub_fp_foo | |
28 | + .text | |
29 | + .align 2 | |
30 | + .globl main | |
31 | + .set mips16 | |
32 | + .set nomicromips | |
33 | + .ent main | |
34 | + .type main, @function | |
35 | +main: | |
36 | + .frame $17,24,$31 # vars= 8, regs= 3/0, args= 16, gp= 0 | |
37 | + .mask 0x80060000,-4 | |
38 | + .fmask 0x00000000,0 | |
39 | + save 40,$17,$18,$31 | |
40 | + addiu $17,$sp,16 | |
41 | + lw $3,.L3 | |
42 | + lw $2,.L4 | |
43 | + move $5,$3 | |
44 | + move $4,$2 | |
45 | + jal foo | |
46 | + sw $2,0($17) | |
47 | + li $2,0 | |
48 | + move $sp,$17 | |
49 | + restore 24,$17,$18,$31 | |
50 | + j $31 | |
51 | + .align 2 | |
52 | +.L3: | |
53 | + .word 1085485875 | |
54 | +.L4: | |
55 | + .word 1065353216 | |
56 | + .end main | |
57 | + .size main, .-main | |
58 | + .ident "GCC: (Sourcery CodeBench Lite 2015.11-12 - Preview) 5.2.0" |
@@ -0,0 +1,43 @@ | ||
1 | + .file 1 "mips-fp-stub-2.c" | |
2 | + .section .mdebug.abi32 | |
3 | + .previous | |
4 | + .nan legacy | |
5 | + .module fp=32 | |
6 | + .module oddspreg | |
7 | + .text | |
8 | + .align 2 | |
9 | + .globl foo | |
10 | + # Stub function for foo (float, float) | |
11 | + .section .mips16.fn.foo,"ax",@progbits | |
12 | + .align 2 | |
13 | + .set nomips16 | |
14 | + .set nomicromips | |
15 | + .ent __fn_stub_foo | |
16 | + .type __fn_stub_foo, @function | |
17 | +__fn_stub_foo: | |
18 | + la $25,foo | |
19 | + mfc1 $4,$f12 | |
20 | + mfc1 $5,$f14 | |
21 | + jr $25 | |
22 | + .end __fn_stub_foo | |
23 | + __fn_local_foo = foo | |
24 | + .text | |
25 | + .set mips16 | |
26 | + .set nomicromips | |
27 | + .ent foo | |
28 | + .type foo, @function | |
29 | +foo: | |
30 | + .frame $17,8,$31 # vars= 0, regs= 2/0, args= 0, gp= 0 | |
31 | + .mask 0x80020000,-4 | |
32 | + .fmask 0x00000000,0 | |
33 | + save 8,$17,$31 | |
34 | + move $17,$sp | |
35 | + sw $4,8($17) | |
36 | + sw $5,12($17) | |
37 | + lw $2,8($17) | |
38 | + move $sp,$17 | |
39 | + restore 8,$17,$31 | |
40 | + j $31 | |
41 | + .end foo | |
42 | + .size foo, .-foo | |
43 | + .ident "GCC: (Sourcery CodeBench Lite 2015.11-12 - Preview) 5.2.0" |
@@ -0,0 +1,2 @@ | ||
1 | + | |
2 | +Section '\.eh_frame' has no debugging data\. |
@@ -60,9 +60,6 @@ SYMBOL TABLE: | ||
60 | 60 | .* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_d_l |
61 | 61 | .* l F .text 0+[0-9a-f]+ m32_static16_d_l |
62 | 62 | .* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_d_l |
63 | -# ??? We aren't yet able to get rid of the symbol table entry for | |
64 | -# __fn_stub_m16_d_d, or its .pdr entry. | |
65 | -.* l F .text 0+[0-9a-f]+ * | |
66 | 63 | .* l F .text 0+[0-9a-f]+ m32_static_d_d |
67 | 64 | .* l F .text 0+[0-9a-f]+ 0xf0 m16_static_d_d |
68 | 65 | .* l F .text 0+[0-9a-f]+ m32_static1_d_d |
@@ -94,6 +91,9 @@ SYMBOL TABLE: | ||
94 | 91 | .* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static16_d_l |
95 | 92 | .* l F .text 0+[0-9a-f]+ __call_stub_fp_m32_static16_d_d |
96 | 93 | .* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static16_d_d |
94 | +# ??? We aren't yet able to get rid of the symbol table entry for | |
95 | +# __fn_stub_m16_d_d, or its .pdr entry. | |
96 | +.* l df \*ABS\* 0+[0-9a-f]+ * | |
97 | 97 | #... |
98 | 98 | .* g F .text 0+[0-9a-f]+ m32_ld |
99 | 99 | #... |