bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/13302] IRELATIVE relocation should come last


From: hjl.tools at gmail dot com
Subject: [Bug binutils/13302] IRELATIVE relocation should come last
Date: Fri, 21 Oct 2011 18:31:06 +0000

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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-10-21 18:31:06 
UTC ---
Another problem:

address@hidden pr13302b]$ cat x.c
void alt2(void) { }

static void (*resolve (void)) (void)
{
  return alt2;
}

void fct(void) __attribute__ ((ifunc ("resolve")));
extern __typeof(fct) int_fct __attribute__ ((alias("fct")));

void (*g)(void)  = int_fct;
int
main ()
{
  g ();
  return 0;
}
address@hidden pr13302b]$ make
/usr/gcc-4.7.0-x32/bin/gcc -fpie   -c -o x.o x.c
/usr/gcc-4.7.0-x32/bin/gcc -pie -o x x.o
readelf -r --wide x

Relocation section '.rela.dyn' at offset 0x498 contains 10 entries:
    Offset             Info             Type               Symbol's Value 
Symbol's Name + Addend
00000000002008c8  0000000000000008 R_X86_64_RELATIVE                           
   00000000000006a0
00000000002008d0  0000000000000008 R_X86_64_RELATIVE                           
   0000000000000670
0000000000200ab0  0000000000000008 R_X86_64_RELATIVE                           
   0000000000000790
0000000000200ac0  0000000000000008 R_X86_64_RELATIVE                           
   0000000000000700
0000000000200ac8  0000000000000008 R_X86_64_RELATIVE                           
   00000000000006df
0000000000200b18  0000000000000008 R_X86_64_RELATIVE                           
   0000000000200b18
0000000000200ab8  0000000500000006 R_X86_64_GLOB_DAT      0000000000000000
__gmon_start__ + 0
0000000000200ad0  0000000a00000006 R_X86_64_GLOB_DAT      0000000000000000
_Jv_RegisterClasses + 0
0000000000200ad8  0000000b00000006 R_X86_64_GLOB_DAT      0000000000000000
__cxa_finalize + 0
0000000000200b20  0000000000000025 R_X86_64_IRELATIVE                          
   00000000000006d2

Relocation section '.rela.plt' at offset 0x588 contains 3 entries:
    Offset             Info             Type               Symbol's Value 
Symbol's Name + Addend
0000000000200af8  0000000400000007 R_X86_64_JUMP_SLOT     0000000000000000
__libc_start_main + 0
0000000000200b08  0000000b00000007 R_X86_64_JUMP_SLOT     0000000000000000
__cxa_finalize + 0
0000000000200b00  0000000000000025 R_X86_64_IRELATIVE                          
   00000000000006d2
address@hidden pr13302b]$ 

We have R_X86_64_IRELATIVE in .rela.dyn.

-- 
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]