bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12694] New: Local IFUNC symbol causes TEXTREL


From: hjl.tools at gmail dot com
Subject: [Bug ld/12694] New: Local IFUNC symbol causes TEXTREL
Date: Thu, 21 Apr 2011 22:03:39 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12694

           Summary: Local IFUNC symbol causes TEXTREL
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden


address@hidden ifunc-textrel]$ make clean
rm -f *.o *.so
address@hidden ifunc-textrel]$ cat foo.c
static int
zero (int x) 
{
  return 0;
}

void * foo_ifunc (void) __asm__ ("foo");
void * foo_ifunc (void) { return zero; }
__asm__(".type foo, %gnu_indirect_function");
address@hidden ifunc-textrel]$ cat bar.c
extern int foo (void) __attribute__ ((visibility ("hidden")));

int
bar (void)
{
  return foo ();
}

int
bar2 ()
{
  return foo () + 3;
}
address@hidden ifunc-textrel]$ make
gcc -m32 -O2 -fPIC   -c -o bar.o bar.c
gcc -m32 -O2 -fPIC   -c -o foo.o foo.c
./ld -m elf_i386 -z nocombreloc -shared -o libfoo.so bar.o foo.o
--version-script=libfoo.map
readelf -d libfoo.so | grep TEXTREL
 0x00000016 (TEXTREL)                    0x0

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]