From b6947a7f08011375120186688bf2efd866f7d148 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 14 Jun 2017 05:49:02 -0700 Subject: [PATCH] Skip sizeof/startof tests on targets with leading char Symbol lookup in linker will always fail on targets with leading char in symbol name since __start_SECNAME and __stop_SECNAME in C may be ___start_SECNAME and ___stop_SECNAME in assembly. * testsuite/ld-elf/sizeofa.d: Skip on targets with leading char in symbol name. * testsuite/ld-elf/sizeofb.d: Likewise. * testsuite/ld-elf/startofa.d: Likewise. * testsuite/ld-elf/startofb.d: Likewise. --- ld/ChangeLog | 8 ++++++++ ld/testsuite/ld-elf/sizeofa.d | 4 ++++ ld/testsuite/ld-elf/sizeofb.d | 4 ++++ ld/testsuite/ld-elf/startofa.d | 4 ++++ ld/testsuite/ld-elf/startofb.d | 4 ++++ 5 files changed, 24 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index 44064fd45fb..371859a6db1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2017-06-14 H.J. Lu + + * testsuite/ld-elf/sizeofa.d: Skip on targets with leading char + in symbol name. + * testsuite/ld-elf/sizeofb.d: Likewise. + * testsuite/ld-elf/startofa.d: Likewise. + * testsuite/ld-elf/startofb.d: Likewise. + 2017-06-14 Georg-Johann Lay PR ld/21583 diff --git a/ld/testsuite/ld-elf/sizeofa.d b/ld/testsuite/ld-elf/sizeofa.d index 0aac60770ff..d4432a0f068 100644 --- a/ld/testsuite/ld-elf/sizeofa.d +++ b/ld/testsuite/ld-elf/sizeofa.d @@ -1,6 +1,10 @@ #source: sizeof.s #ld: -Ur #readelf: -sW +#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-* +#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-* +#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-* +# Targets with a leading char will faill this test. Symbol table '\.symtab' contains [0-9]+ entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name diff --git a/ld/testsuite/ld-elf/sizeofb.d b/ld/testsuite/ld-elf/sizeofb.d index 331c3864920..cd3920b006d 100644 --- a/ld/testsuite/ld-elf/sizeofb.d +++ b/ld/testsuite/ld-elf/sizeofb.d @@ -2,6 +2,10 @@ #ld: -shared #readelf: -sW #target: *-*-linux* *-*-gnu* +#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-* +#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-* +#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-* +# Targets with a leading char will faill this test. Symbol table '\.dynsym' contains [0-9]+ entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name diff --git a/ld/testsuite/ld-elf/startofa.d b/ld/testsuite/ld-elf/startofa.d index 00ab27e7ee6..cb261df7f5a 100644 --- a/ld/testsuite/ld-elf/startofa.d +++ b/ld/testsuite/ld-elf/startofa.d @@ -1,6 +1,10 @@ #source: startof.s #ld: -Ur #readelf: -sW +#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-* +#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-* +#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-* +# Targets with a leading char will faill this test. Symbol table '\.symtab' contains [0-9]+ entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name diff --git a/ld/testsuite/ld-elf/startofb.d b/ld/testsuite/ld-elf/startofb.d index e03bd23c068..0d1da663bdd 100644 --- a/ld/testsuite/ld-elf/startofb.d +++ b/ld/testsuite/ld-elf/startofb.d @@ -2,6 +2,10 @@ #ld: -shared #readelf: -sW #target: *-*-linux* *-*-gnu* +#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-* +#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-* +#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-* +# Targets with a leading char will faill this test. Symbol table '\.dynsym' contains [0-9]+ entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name -- 2.30.2