https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93384
--- Comment #7 from Victor Stinner <vstinner at redhat dot com> ---
<mock-chroot> sh-5.0# as -a64 -mpower8 -many -mlittle -o test.o getbuildinfo.s
getbuildinfo.s: Assembler messages:
getbuildinfo.s:87427: Error: redefined symbol cannot be used on reloc
getbuildinfo.s:261948: Error: redefined symbol cannot be used on reloc
...
addi 5,5,.LC715@toc@l
li 4,0
bl _PyObject_AssertFailed.localalias <===== LINE 87427
.LVL7500:
.loc 31 2180 9 is_stmt 0 view .LVU23717
...
...
addi 5,5,.LC715@toc@l
li 4,0
bl _PyObject_AssertFailed.localalias <===== LINE 261948
.LVL25059:
...
---
I found "_PyObject_AssertFailed.localalias" somewhere else:
...
.LFE6858:
.size _PyObject_AssertFailed,.-_PyObject_AssertFailed
.set _PyObject_AssertFailed.localalias,_PyObject_AssertFailed
.set _PyObject_AssertFailed.localalias,_PyObject_AssertFailed
.align 2
.globl PyInit_xxsubtype
.type PyInit_xxsubtype, @function
PyInit_xxsubtype:
...
---
In Python, _PyObject_AssertFailed() is declared in Include/cpython/object.h by:
PyAPI_FUNC(void) _PyObject_AssertFailed(
PyObject *obj,
const char *expr,
const char *msg,
const char *file,
int line,
const char *function);
Using gcc -E, I got:
# 446 "../Include/cpython/object.h"
__attribute__ ((visibility ("default"))) void _PyObject_AssertFailed(
PyObject *obj,
const char *expr,
const char *msg,
const char *file,
int line,
const char *function);
And it's implemented as:
void
_PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
const char *file, int line, const char *function)
{
...
}