• 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ão6c699715f68be7d8c468e965fbefce997f7ed937 (tree)
Hora2017-10-11 00:18:07
AutorRenlin Li <renlin.li@arm....>
CommiterRenlin Li

Mensagem de Log

[ARM] PR ld/21402, only override the symbol dynamic decision on undefined weak symbol.

Similar as aarch64 backend, arm backend only overrides the decision on undefined
weak symbols. arm backend part already emits necessary relative relocation for
this case.

bfd/

PR ld/21402
* elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
symbols into dynamic.

ld/

PR ld/21402
* testsuite/ld-arm/tls-app.d: Update address.
* testsuite/ld-arm/tls-app.r: Remove relocations.
* testsuite/ld-arm/unresolved-1-dyn.d: Update.

Mudança Sumário

Diff

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
1+2017-10-10 Renlin Li <renlin.li@arm.com>
2+
3+ PR ld/21402
4+ * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
5+ symbols into dynamic.
6+
17 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
28
39 PR ld/22274
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -15443,8 +15443,8 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
1544315443 {
1544415444 /* Make sure this symbol is output as a dynamic symbol.
1544515445 Undefined weak syms won't yet be marked as dynamic. */
15446- if (h->dynindx == -1
15447- && !h->forced_local)
15446+ if (h->dynindx == -1 && !h->forced_local
15447+ && h->root.type == bfd_link_hash_undefweak)
1544815448 {
1544915449 if (! bfd_elf_link_record_dynamic_symbol (info, h))
1545015450 return FALSE;
@@ -15531,8 +15531,8 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
1553115531
1553215532 /* Make sure this symbol is output as a dynamic symbol.
1553315533 Undefined weak syms won't yet be marked as dynamic. */
15534- if (h->dynindx == -1
15535- && !h->forced_local)
15534+ if (h->dynindx == -1 && !h->forced_local
15535+ && h->root.type == bfd_link_hash_undefweak)
1553615536 {
1553715537 if (! bfd_elf_link_record_dynamic_symbol (info, h))
1553815538 return FALSE;
@@ -15755,8 +15755,8 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
1575515755 {
1575615756 /* Make sure this symbol is output as a dynamic symbol.
1575715757 Undefined weak syms won't yet be marked as dynamic. */
15758- if (h->dynindx == -1
15759- && !h->forced_local)
15758+ if (h->dynindx == -1 && !h->forced_local
15759+ && h->root.type == bfd_link_hash_undefweak)
1576015760 {
1576115761 if (! bfd_elf_link_record_dynamic_symbol (info, h))
1576215762 return FALSE;
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
1+2017-10-10 Renlin Li <renlin.li@arm.com>
2+
3+ PR ld/21402
4+ * testsuite/ld-arm/tls-app.d: Update address.
5+ * testsuite/ld-arm/tls-app.r: Remove relocations.
6+ * testsuite/ld-arm/unresolved-1-dyn.d: Update.
7+
18 2017-10-10 Alan Modra <amodra@gmail.com>
29
310 * Makefile.am (earmelfb_fuchsia.c): Rename rule from earmelf_fuchsia.c.
--- a/ld/testsuite/ld-arm/tls-app.d
+++ b/ld/testsuite/ld-arm/tls-app.d
@@ -2,17 +2,17 @@
22 .*: file format elf32-.*arm.*
33 architecture: arm.*, flags 0x00000112:
44 EXEC_P, HAS_SYMS, D_PAGED
5-start address 0x000081c8
5+start address 0x00008[0-9a-f]+
66
77 Disassembly of section .text:
88
9-000081c8 <foo>:
10- 81c8: e1a00000 nop ; \(mov r0, r0\)
11- 81cc: e1a00000 nop ; \(mov r0, r0\)
12- 81d0: e1a0f00e mov pc, lr
13- 81d4: 000080bc .word 0x000080bc
14- 81d8: 000080b4 .word 0x000080b4
15- 81dc: 000080ac .word 0x000080ac
16- 81e0: 00000004 .word 0x00000004
17- 81e4: 000080c4 .word 0x000080c4
18- 81e8: 00000014 .word 0x00000014
9+00008[0-9a-f]+ <foo>:
10+ 8[0-9a-f]+: e1a00000 nop ; \(mov r0, r0\)
11+ 8[0-9a-f]+: e1a00000 nop ; \(mov r0, r0\)
12+ 8[0-9a-f]+: e1a0f00e mov pc, lr
13+ 8[0-9a-f]+: 000080bc .word 0x000080bc
14+ 8[0-9a-f]+: 000080b4 .word 0x000080b4
15+ 8[0-9a-f]+: 000080ac .word 0x000080ac
16+ 8[0-9a-f]+: 00000004 .word 0x00000004
17+ 8[0-9a-f]+: 000080c4 .word 0x000080c4
18+ 8[0-9a-f]+: 00000014 .word 0x00000014
--- a/ld/testsuite/ld-arm/tls-app.r
+++ b/ld/testsuite/ld-arm/tls-app.r
@@ -3,8 +3,5 @@
33
44 DYNAMIC RELOCATION RECORDS
55 OFFSET TYPE VALUE
6-[0-9a-f]+ R_ARM_TLS_DTPMOD32 app_gd
7-[0-9a-f]+ R_ARM_TLS_DTPOFF32 app_gd
86 [0-9a-f]+ R_ARM_TLS_DTPMOD32 lib_gd
97 [0-9a-f]+ R_ARM_TLS_DTPOFF32 lib_gd
10-[0-9a-f]+ R_ARM_TLS_TPOFF32 app_ie
--- a/ld/testsuite/ld-arm/unresolved-1-dyn.d
+++ b/ld/testsuite/ld-arm/unresolved-1-dyn.d
@@ -5,4 +5,4 @@
55
66 Relocation section '\.rel\.dyn' .*
77 Offset .*
8-.* R_ARM_GLOB_DAT +00000000 +foo
8+^.* 00000000 R_ARM_NONE.+