This is the mail archive of the mailing list for the GCC 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]

Undefined Local Symbol on PowerPC


I think this is a bug in GCC 5 on the PowerPC.  The code has compiled and
linked fine for years with various versions of GCC and friends.

powerpc-rtems4.11-gcc (GCC) 5.0.0 20150412 (experimental)

bootloader.o:(.debug_loc+0x3ce2): undefined reference to `.LCL2'

This looks like a symbol generation problem with GCC

$ powerpc-rtems4.11-gcc --pipe -DHAVE_CONFIG_H   -D__BOOT__ 
-B../../../../../../../lib/ -B../../../../../../../mvme2100/lib/ -specs
bsp_specs -qrtems -mrelocatable -msoft-float -mstrict-align -fno-builtin
-Wall -mmultiple -mstring -O2 -fomit-frame-pointer -ffixed-r13
-mno-sdata  -mcpu=603e -Dppc603e -O2 -g -mmultiple -mstring
-mstrict-align -Wall -Wmissing-prototypes
-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -S
`test -f '../../../powerpc/shared/bootloader/zlib.c' || echo

$ grep LCL2 *.s
    lwz 0,.LCL22-.LCF22(30)
    lwz 0,.LCL23-.LCF23(30)
    lwz 0,.LCL24-.LCF24(30)
    lwz 0,.LCL25-.LCF25(30)
    .4byte    .LCL2
    .4byte    .LCL2

Based on the grep, the .4byte directives are referencing a bogus symbol.

Does this look like a GCC bug? If so, I will file a PR with the preprocessed


Joel Sherrill, Ph.D.             Director of Research & Development        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

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