Opened 3 years ago

Closed 3 years ago

#17253 closed bug (fixed)

B_CURRENT_IMAGE_SYMBOL can't work with gcc2

Reported by: mt Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: - General Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

Using B_CURRENT_IMAGE_SYMBOL with gcc2 results in 'undefined reference' error.
gcc2 works when "&" is removed from B_CURRENT_IMAGE_SYMBOL macro.

example:

#include <kernel/image.h>
#include <stdio.h>

main()
{
#if 1

// gcc2 does not work with B_CURRENT_IMAGE_SYMBOL.
// defined as ((void*)&__func__)
	printf("%p\n", B_CURRENT_IMAGE_SYMBOL);

#else

// gcc2 works when "&" is removed from B_CURRENT_IMAGE_SYMBOL.
	printf("%p\n", ((void*)__func__));

#endif
}

Change History (4)

comment:2 by korli, 3 years ago

Platform: Allx86

comment:3 by waddlesplash, 3 years ago

I guess the & may not be needed?

comment:4 by waddlesplash, 3 years ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: newclosed

Fixed in hrev55423.

Note: See TracTickets for help on using tickets.