This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

alpha/linux does not like weak+hidden+extern functions ?


i've been poking at the alpha/uClibc port of late when i hit a little snag ...

basically in the uclibc init function, there is an optional stdio init 
step ... without getting into details, ive attached a reduced testcase ... 
when trying to build for alpha, i get:
$ alpha-gentoo-linux-uclibc-gcc -nostdlib alpha-hidden-weak.c
In function `_start': relocation truncated to fit: GPRELHIGH against undefined 
symbol `_stdio_init'

the other arches ive tested (pretty much all of the linux ones) are just fine 
with this code ... normally i'm using binutils 2.16.1 but 2.16.91.0.6 fails 
in the same manner ...
-mike
#define NULL ((void*)0)
#define weak_function __attribute__ ((weak))
#define attribute_hidden __attribute__ ((visibility ("hidden")))

extern void weak_function _stdio_init(void) attribute_hidden;

int _start(void)
{
	if (_stdio_init != NULL)
		_stdio_init();
	return 0;
}

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