This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

".symver" and "-flto" interaction resulting in link failure with undefined references

First off: not sure if this belongs here or on gcc's list, so I've
sent it here first.

I've been trying to build numactl
with CFLAGS="-flto". This results in undefined references to symbols
on link (output follows):

cc -flto  numactl.o util.o shm.o bitops.o   -o numactl
/tmp/cckkT9OH.ltrans0.ltrans.o: In function `main':
cckkT9OH.ltrans0.o:(.text+0x11c): undefined reference to
cckkT9OH.ltrans0.o:(.text+0x130): undefined reference to
cckkT9OH.ltrans0.o:(.text+0x139): undefined reference to `numa_get_membind'
cckkT9OH.ltrans0.o:(.text+0x5cc): undefined reference to `numa_node_to_cpus'
cckkT9OH.ltrans0.o:(.text+0x90e): undefined reference to
cckkT9OH.ltrans0.o:(.text+0x91c): undefined reference to
cckkT9OH.ltrans0.o:(.text+0x9a5): undefined reference to `numa_run_on_node_mask'
cckkT9OH.ltrans0.o:(.text+0xa2e): undefined reference to
cckkT9OH.ltrans0.o:(.text+0xad1): undefined reference to
cckkT9OH.ltrans0.o:(.text+0xadf): undefined reference to `numa_set_membind'
/tmp/cckkT9OH.ltrans0.ltrans.o: In function `show_physcpubind.2081':
cckkT9OH.ltrans0.o:(.text+0x1c55): undefined reference to
collect2: ld returned 1 exit status
make: *** [numactl] Error 1

Looking at (for example) the definition of numa_set_membind:
__asm__(".symver numa_set_membind_v1,numa_set_membind@libnuma_1.1");
__asm__(".symver numa_set_membind_v2,numa_set_membind@@libnuma_1.2");

The others are similarly defined via symvers. Additionally note is passed on the link command line directly (not via

Any ideas? (Thanks)
Cody Schafer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]