https://sourceware.org/bugzilla/show_bug.cgi?id=19171
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at sourceware dot org |hjl.tools at gmail dot com --- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> --- [hjl@gnu-tools-1 pr19161]$ cat x.c extern int a; extern int __start_my_section __attribute__((weak,visibility("hidden"))); int dump1() { int* ap = &__start_my_section; return ap[0]; } [hjl@gnu-tools-1 pr19161]$ cat y.c extern int a[]; extern int __start_my_section __attribute__((weak,visibility("hidden"))); int dump2() { int* ap = &__start_my_section; return ap[0]; } [hjl@gnu-tools-1 pr19161]$ cat z.c int __attribute__((section("my_section"))) a[2] = {0x1234, 0x5678}; extern int __start_my_section __attribute__((weak,visibility("hidden"))); int dump3() { int* ap = &__start_my_section; return ap[0]; } [hjl@gnu-tools-1 pr19161]$ gcc -fPIC -O2 -c x.c y.c z.c -m32 [hjl@gnu-tools-1 pr19161]$ ld -m elf_i386 x.o y.o z.o -shared ld: BFD (Linux/GNU Binutils) 2.25.51.0.4.20151022 assertion fail /net/gnu-6/export/linux/src/binutils/binutils/bfd/elf32-i386.c:5281 [hjl@gnu-tools-1 pr19161]$ -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils