[Top][All Lists]

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

[Bug ld/14968] New: Missing R_*_IRELATIVE relocation

From: hjl.tools at gmail dot com
Subject: [Bug ld/14968] New: Missing R_*_IRELATIVE relocation
Date: Sun, 16 Dec 2012 17:46:26 +0000


             Bug #: 14968
           Summary: Missing R_*_IRELATIVE relocation
           Product: binutils
           Version: 2.24 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified

address@hidden ifunc-global]$ cat foo.c
static int
two (void)
  return 2;

void * foo_ifunc (void) __asm__ ("foo1") __attribute__ ((visibility
__asm__(".type foo, %gnu_indirect_function");
__asm__("foo = foo1");
__asm__(".hidden foo");
__asm__(".global foo");

void * 
foo_ifunc (void)
  return two;

extern int foo (void);

bar (void)
  return foo ();
address@hidden ifunc-global]$ cat bar.c
extern int foo (void);
int (*foo1_ptr) (void) = foo;
address@hidden ifunc-global]$ cat main.c 
#include <stdlib.h>

extern int (*foo1_ptr) (void);

main (void)
  int foo1;

  foo1 = foo1_ptr ();
  if (foo1 != 2)
    abort ();
  return 0;
address@hidden ifunc-global]$ make
gcc  -g   -c -o main.o main.c
gcc  -g -fPIC   -c -o bar.o bar.c
gcc  -g -fPIC   -c -o foo.o foo.c
./ld  --shared -o libfoo.so -z nocombreloc bar.o foo.o
gcc  -o main main.o libfoo.so -Wl,-rpath,.
readelf -r --wide libfoo.so

Relocation section '.rela.plt' at offset 0x220 contains 1 entries:
    Offset             Info             Type               Symbol's Value 
Symbol's Name + Addend
0000000000200430  0000000000000025 R_X86_64_IRELATIVE                       
make: *** [all] Segmentation fault
address@hidden ifunc-global]$

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]