bogus textrels with alpha target ?

Mike Frysinger vapier@gentoo.org
Fri Dec 2 23:42:00 GMT 2005


with the addition of automated ELF QA checks to Gentoo, we started
noticing that alpha hosts had a lot of binaries ending up with TEXTREL
markings.  for example, when building the shadow package against pam,
the passwd and su binaries are marked with DT_TEXTREL:
# readelf -d /bin/passwd | grep TEXTREL
 0x0000000000000016 (TEXTREL)            0x0
 0x000000000000001e (FLAGS)              SYMBOLIC TEXTREL BIND_NOW STATIC_TLS

i narrowed down the test case (which is attached) and checked against
binutils versions:
2.14.90.0.8
2.15.92.0.2
2.16.1
2.16.91.0.4
and gcc versions:
3.3.2
3.4.4

and yes, i checked that it isnt a Gentoo-issue because Debian exhibits
the same behavior (/usr/bin/passwd in the alpha deb 4.0.13-4 has same
output as above)

so then the question is, am i looking at a bug in binutils ?
-mike
-------------- next part --------------
CC = gcc
CFLAGS = -Wall -s

all: libshared.so
	$(CC) $(CFLAGS) main.c libshared.so -o main

libshared.so: libshared.c
	$(CC) $(CFLAGS) -shared -fPIC libshared.c -o libshared.so

clean:
	rm -f *.o *.so main
-------------- next part --------------
int shared_func(void) { return 1234; }
-------------- next part --------------
struct arr_func {
	int (*func)(void);
	void *appdata_ptr;
};
extern int shared_func(void);
static const struct arr_func my_funcs = {
	shared_func, (void*)0
};
int main() { return 0; }


More information about the Binutils mailing list