• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisãoca9584fb9b4a54232d2538de9f75b1916bda00fe (tree)
Hora2015-10-29 22:58:16
AutorCatherine Moore <clm@code...>
CommiterCatherine Moore

Mensagem de Log

2015-10-29 Catherine Moore <clm@codesourcery.com>

bfd/
* elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
section to bfd_abs_section_ptr if the stub is discarded.
ld/testsuite/
* ld-mips-elf/mips16-fp-stub-1.s: New.
* ld-mips-elf/mips16-fp-stub-2.s: New.
* ld-mips-elf/mips16-fp-stub.d: New.
* ld-mips-elf/mips-elf.exp: Run new tests.
* ld-mips-elf/mips16-intermix.d: Update expected output.

https://sourceware.org/ml/binutils/2015-10/msg00137.html

Mudança Sumário

Diff

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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+
16 2015-10-29 Ed Schouten <ed@nuxi.nl>
27
38 * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -1707,6 +1707,7 @@ mips_elf_check_mips16_stubs (struct bfd_link_info *info,
17071707 h->fn_stub->flags &= ~SEC_RELOC;
17081708 h->fn_stub->reloc_count = 0;
17091709 h->fn_stub->flags |= SEC_EXCLUDE;
1710+ h->fn_stub->output_section = bfd_abs_section_ptr;
17101711 }
17111712
17121713 if (h->call_stub != NULL
@@ -1719,6 +1720,7 @@ mips_elf_check_mips16_stubs (struct bfd_link_info *info,
17191720 h->call_stub->flags &= ~SEC_RELOC;
17201721 h->call_stub->reloc_count = 0;
17211722 h->call_stub->flags |= SEC_EXCLUDE;
1723+ h->call_stub->output_section = bfd_abs_section_ptr;
17221724 }
17231725
17241726 if (h->call_fp_stub != NULL
@@ -1731,6 +1733,7 @@ mips_elf_check_mips16_stubs (struct bfd_link_info *info,
17311733 h->call_fp_stub->flags &= ~SEC_RELOC;
17321734 h->call_fp_stub->reloc_count = 0;
17331735 h->call_fp_stub->flags |= SEC_EXCLUDE;
1736+ h->call_fp_stub->output_section = bfd_abs_section_ptr;
17341737 }
17351738 }
17361739
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -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+
19 2015-10-28 H.J. Lu <hongjiu.lu@intel.com>
210
311 PR ld/19162
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -666,6 +666,16 @@ run_ld_link_tests $mips16_intermix_test
666666
667667 run_dump_test "mips16-local-stubs-1"
668668
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+
669679 set o32flagslist [list [list as $abi_asflags(o32)] [list ld $abi_ldflags(o32)]]
670680
671681 foreach firstfpabi [list 0 1 2 3 4 5 6 7 ] {
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-fp-stub-1.s
@@ -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"
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-fp-stub-2.s
@@ -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"
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-fp-stub.d
@@ -0,0 +1,2 @@
1+
2+Section '\.eh_frame' has no debugging data\.
--- a/ld/testsuite/ld-mips-elf/mips16-intermix.d
+++ b/ld/testsuite/ld-mips-elf/mips16-intermix.d
@@ -60,9 +60,6 @@ SYMBOL TABLE:
6060 .* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_d_l
6161 .* l F .text 0+[0-9a-f]+ m32_static16_d_l
6262 .* 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]+ *
6663 .* l F .text 0+[0-9a-f]+ m32_static_d_d
6764 .* l F .text 0+[0-9a-f]+ 0xf0 m16_static_d_d
6865 .* l F .text 0+[0-9a-f]+ m32_static1_d_d
@@ -94,6 +91,9 @@ SYMBOL TABLE:
9491 .* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static16_d_l
9592 .* l F .text 0+[0-9a-f]+ __call_stub_fp_m32_static16_d_d
9693 .* 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]+ *
9797 #...
9898 .* g F .text 0+[0-9a-f]+ m32_ld
9999 #...