mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
arm: don't engage symver scrubber hack in CCS mode
In that mode the comment char is ; while @ has no special meaning. Engaging the special logic in that case results in comments not being respected on .symver lines.
This commit is contained in:
parent
6170a088a6
commit
9135fac423
@ -805,7 +805,9 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen,
|
||||
in this function. */
|
||||
if (symver_state == NULL)
|
||||
{
|
||||
if ((state == 0 || state == 1) && ch == symver_pseudo[0])
|
||||
if ((state == 0 || state == 1)
|
||||
&& strchr (tc_comment_chars, '@') != NULL
|
||||
&& ch == symver_pseudo[0])
|
||||
symver_state = symver_pseudo + 1;
|
||||
}
|
||||
else
|
||||
|
10
gas/testsuite/gas/arm/ccs-symver.d
Normal file
10
gas/testsuite/gas/arm/ccs-symver.d
Normal file
@ -0,0 +1,10 @@
|
||||
#name: .symver in CCS mode
|
||||
#as: -mccs
|
||||
#readelf: -sW
|
||||
# This test is only valid on ELF based ports.
|
||||
#notarget: *-*-pe *-*-wince
|
||||
|
||||
#...
|
||||
+[0-9]+: +0+ +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo
|
||||
+[0-9]+: +0+ +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo@version1
|
||||
#pass
|
7
gas/testsuite/gas/arm/ccs-symver.s
Normal file
7
gas/testsuite/gas/arm/ccs-symver.s
Normal file
@ -0,0 +1,7 @@
|
||||
.data
|
||||
.globl foo
|
||||
.type foo,@object
|
||||
foo:
|
||||
.byte 0
|
||||
.size foo,.-foo
|
||||
.symver foo,foo@version1;remove
|
Loading…
Reference in New Issue
Block a user