[PATCH ARM] Request to revert fix for bug 15302

Terry Guo terry.guo@arm.com
Fri Jun 28 09:12:00 GMT 2013


Hello,

The committed fix for Bug 15302 is too aggressive and will apply
ST_BRANCH_TO_THUMB to symbol that represents function name with weak
attribute or array name of function pointer. Subsequently this causes LD set
the last bit of their address to 1. For code like below:

void foo() __attribute__((weak));
void (*fp)() = foo; // the fp is not zero even when no none defines the foo.
if (fp != NULL)
   fp();

or

extern void (*bar[]) (void) __attribute__((weak));

The last of bit of bar is set to 1. So the bar[1] will be a fault access.

Thus I request to revert this fix for the time being and I shall provide a
better patch. Sorry for any inconvenience.

BR,
Terry




More information about the Binutils mailing list