This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
alpha/linux does not like weak+hidden+extern functions ?
- From: Mike Frysinger <vapier at gentoo dot org>
- To: binutils at sources dot redhat dot com
- Date: Wed, 15 Feb 2006 20:36:33 -0500
- Subject: 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;
}