https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65779
Bug ID: 65779 Summary: undefined local symbol on powerpc Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: joel at gcc dot gnu.org Created attachment 35323 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35323&action=edit Preprocessed source from zlib.c from RTEMS PowerPC bootloader This file compiled without an undefined symbol with many gcc versions prior to 5.x. powerpc-rtems4.11-gcc (GCC) 5.0.0 20150412 (experimental) Fails: powerpc-rtems4.11-gcc -mrelocatable -mcpu=603e -O2 -g zlib_pp.c Passes: powerpc-rtems4.11-gcc -mcpu=603e -O2 -g zlib_pp.c Fails: powerpc-rtems4.11-gcc -mrelocatable -O2 -g zlib_pp.c Also passes at -Os, -O0, and -O1. The error is that the assembly language produced has a .4byte directive with a reference to a symbol that is not generated. $ grep LCL2 zlib_pp.s .LCL22: lwz 0,.LCL22-.LCF22(30) .LCL23: lwz 0,.LCL23-.LCF23(30) .LCL24: lwz 0,.LCL24-.LCF24(30) .LCL25: lwz 0,.LCL25-.LCF25(30) .4byte .LCL2 .4byte .LCL2