[Bug target/65058] New: AIX: missing extern decorations "[DS]" for functions and "[RW]" for variables
michael.haubenwallner@ssi-schaefer.com
gcc-bugzilla@gcc.gnu.org
Fri Feb 13 21:36:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65058
Bug ID: 65058
Summary: AIX: missing extern decorations "[DS]" for functions
and "[RW]" for variables
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: michael.haubenwallner@ssi-schaefer.com
CC: dje at gcc dot gnu.org
Target: powerpc-ibm-aix
With gcc-4.2, references to external functions and variables were decorated
with "[DS]" and "[RW]", respectively.
With gcc-4.8, these decorations are missing, even though ASM_OUTPUT_EXTERNAL
(xcoff.h) pretends to add them.
$ cat > extref.c <<EOF
extern int externvar;
extern void externfunc(void);
int *localvar = &externvar;
void (*localfunc)(void) = externfunc;
EOF
$ gcc-4.2.4 -S extref.c -o - | grep extern
.long externvar[RW]
.long externfunc[DS]
$ gcc-4.8.4 -S extref.c -o - | grep extern
.long externvar
.long externfunc
The latter may lead to the linker error
ld: 0711-317 ERROR: Undefined symbol: .externfunc
in the corner case when:
*) externfunc is imported via an Import File
*) externfunc() is used as direct function call
*) externfunc is used to initialize a function pointer
*) there is some larger number of symbols to import, so no small testcase.
My particular problem is with openssh linking against the Import File
libcrypto.so(shr.imp).
More information about the Gcc-bugs
mailing list