• 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

Revisiónbe2b629f6427812a24f38802ba1c472a2cbfab7d (tree)
Tiempo2017-09-22 23:05:53
AutorH.J. Lu <hjl.tools@gmai...>
CommiterH.J. Lu

Log Message

Add a test for PR ld/22150

PR ld/22150
* testsuite/ld-elf/pr22150.vd: New file.
* testsuite/ld-elf/pr22150.ver: Likewise.
* testsuite/ld-elf/pr22150a.s: Likewise.
* testsuite/ld-elf/pr22150b.s: Likewise.
* testsuite/ld-elf/shared.exp: Run PR ld/22150 tests.

Cambiar Resumen

Diferencia incremental

--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,12 @@
1+2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
2+
3+ PR ld/22150
4+ * testsuite/ld-elf/pr22150.vd: New file.
5+ * testsuite/ld-elf/pr22150.ver: Likewise.
6+ * testsuite/ld-elf/pr22150a.s: Likewise.
7+ * testsuite/ld-elf/pr22150b.s: Likewise.
8+ * testsuite/ld-elf/shared.exp: Run PR ld/22150 tests.
9+
110 2017-09-21 Alan Modra <amodra@gmail.com>
211
312 * testsuite/ld-powerpc/tlsopt5.wf: Update for reduced alignment.
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr22150.vd
@@ -0,0 +1,2 @@
1+
2+No version information found in this file.
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr22150.ver
@@ -0,0 +1,6 @@
1+BAR {
2+global:
3+ bar;
4+local:
5+ *;
6+};
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr22150a.s
@@ -0,0 +1,6 @@
1+ .text
2+ .globl bar
3+ .type bar, %function
4+bar:
5+ .byte 0
6+ .size bar, .-bar
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr22150b.s
@@ -0,0 +1,13 @@
1+ .section .text._start,"ax",%progbits
2+ .globl _start
3+ .type _start, %function
4+_start:
5+ .byte 0
6+ .size _start, .-_start
7+
8+ .section .text.bar,"ax",%progbits
9+ .globl foo
10+ .type foo, %function
11+foo:
12+ .dc.a bar
13+ .size foo, .-foo
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -170,6 +170,29 @@ if { [check_gc_sections_available] } {
170170 "pr21233-3"]]
171171 }
172172
173+if { [check_gc_sections_available] } {
174+ run_ld_link_tests [list \
175+ [list \
176+ "Build pr22150.so" \
177+ "$LFLAGS -shared --version-script pr22150.ver" \
178+ "" \
179+ "$AFLAGS_PIC" \
180+ {pr22150a.s} \
181+ {} \
182+ "pr22150.so" \
183+ ] \
184+ [list \
185+ "Build pr22150" \
186+ "$LFLAGS -e _start --gc-sections" \
187+ "tmpdir/pr22150.so" \
188+ "" \
189+ {pr22150b.s} \
190+ {{readelf -V pr22150.vd}} \
191+ "pr22150" \
192+ ] \
193+ ]
194+}
195+
173196 # Check to see if the C compiler works
174197 if { [which $CC] == 0 } {
175198 return