Hi Mike,
On 9/1/2010 10:04 AM, Mike Frysinger wrote:
> On Wednesday, September 01, 2010 02:05:04 Ben Warren wrote:
>> + if (board_eth_init != __def_eth_init) {
>> + } else if (cpu_eth_init != __def_eth_init) {
> i'm not sure these changes are useful. the resolution of the symbols happens
> at link time, so it isnt like gcc will be able to optimize away the default.
>
> if anything, it'd make more sense to declare the functions as external/weak,
> and then check that the pointer is not NULL. that'd save on the overhead of
> having uncalled stub functions that merely return 0 in the final linked image.
> -mike
This did work as I hoped on my PPC eval board, but maybe not globally.
I remember that initially, with the functions defined as weak but with
no body, check for NULL didn't work. I've never tried declaring them as
external, though.
thanks,
Ben
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot