[Bug c/24863] New: New __attribute__((alias("target"))) requirement break aliasing assembler functions
arnold-j at t-online dot de
gcc-bugzilla@gcc.gnu.org
Mon Nov 14 21:47:00 GMT 2005
The new requirement for (weak) symbol aliasing:
<Quote from GCC 4.0.x release notes>
Given __attribute__((alias("target"))) it is now an error if target is not a
symbol, defined in the same translation unit. This also applies to aliases
created by #pragma weak alias=target. This is because it's meaningless to
define
an alias to an undefined symbol. On Solaris, the native assembler would have
caught this error, but GNU as does not.
</Quote>
breaks compilation of code like this (example from an sh-elf target, but the
effect is architecture-independent):
extern __attribute__((weak,alias("UIE11"))) void NMI(void);
void UIE11 (void);
asm(
"_UIE11:\tbsr\t_UIE\n\tmov.l\t@r15+,r4\t\n"
);
which is perfectly valid and worked in all of gcc 3.0.x, gcc 3.3.x and gcc
3.4.x
--
Summary: New __attribute__((alias("target"))) requirement break
aliasing assembler functions
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: arnold-j at t-online dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24863
More information about the Gcc-bugs
mailing list