[Bug build/28128] New: declare_symbol_alias doesn't work for assembly codes
hjl.tools at gmail dot com
sourceware-bugzilla@sourceware.org
Sat Jul 24 01:09:07 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=28128
Bug ID: 28128
Summary: declare_symbol_alias doesn't work for assembly codes
Product: glibc
Version: 2.34
Status: NEW
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: carlos at redhat dot com
Target Milestone: ---
#define declare_symbol_alias(symbol, original, type, size) \
declare_symbol_alias_1 (symbol, original, type, size)
#ifdef __ASSEMBLER__
# define declare_symbol_alias_1(symbol, original, type, size) \
strong_alias (original, symbol); \
.type C_SYMBOL_NAME (symbol), %##type; \
.size C_SYMBOL_NAME (symbol), size
There are 2 problems:
1. .type and .size are substituted by arguments.
2. %##type generates "% type" since % isn't valid char for symbol.
But assembler doesn't support "% type":
[hjl@gnu-cfl-2 tmp]$ cat x.s
.data
_r_gnu_debug:
.zero 56
.globl _r_debug
.set _r_debug,_r_gnu_debug
.type _r_debug, % object
.size _r_debug, 40;
[hjl@gnu-cfl-2 tmp]$ gcc -c x.s
x.s: Assembler messages:
x.s:7: Error: unrecognized symbol type ""
x.s:7: Error: junk at end of line, first unrecognized character is `o'
[hjl@gnu-cfl-2 tmp]$ cat x.s
.data
_r_gnu_debug:
.zero 56
.globl _r_debug
.set _r_debug,_r_gnu_debug
.type _r_debug, %object
.size _r_debug, 40;
[hjl@gnu-cfl-2 tmp]$ gcc -c x.s
[hjl@gnu-cfl-2 tmp]$
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list