[PATCH 2/2] Add sparc IFUNC support to Gold.

David Miller davem@davemloft.net
Tue Apr 17 08:29:00 GMT 2012


From: Ian Lance Taylor <iant@google.com>
Date: Mon, 16 Apr 2012 17:00:44 -0700

> David Miller <davem@davemloft.net> writes:
> 
>> Another testcase that still fails is memory_test.sh because that test
>> assumes a minimum alignment of 4K, or something like that.  Whereas
>> sparc's minimum alignment is 8K.  Any suggestions on how to fix that
>> are welcome.
> 
> I assume the problem is the final 0x1000 in lines like
> 
>   "  LOAD           0x001000 0x0*02000 0x0*02000 0x0*04 0x0*04 R   0x1000"
> 
> That is not an important part of the test and it could simply be
> removed.

No, there are more differences than just that last value.  Here
is the stdout file from the test:

There are 10 section headers, starting at offset 0x60a8:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .sec0             PROGBITS        00002000 002000 000004 00   A  0   0  1
  [ 2] .sec1             PROGBITS        00001000 002004 000004 00   A  0   0  1
  [ 3] .sec4             PROGBITS        00002008 002008 000004 00   A  0   0  1
  [ 4] .sec5             PROGBITS        0000200c 00200c 000004 00   A  0   0  0
  [ 5] .sec3             PROGBITS        00005000 005000 000004 00   A  0   0  1
  [ 6] .sec2             PROGBITS        00004000 00603c 000004 00   A  0   0  1
  [ 7] .symtab           SYMTAB          00000000 006040 000020 10      8   1  4
  [ 8] .strtab           STRTAB          00000000 006060 000006 00      0   0  1
  [ 9] .shstrtab         STRTAB          00000000 006066 00003f 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

Elf file type is EXEC (Executable file)
Entry point 0x0
There are 4 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000000 0x00000000 0x00000000 0x02004 0x02004 R   0x2000
  LOAD           0x002004 0x00001000 0x00002004 0x00004 0x00004 R   0x2000
  LOAD           0x002008 0x00002008 0x00002008 0x02ffc 0x02ffc R   0x2000
  LOAD           0x00603c 0x00004000 0x0000603c 0x00004 0x00004 R   0x2000

 Section to Segment mapping:
  Segment Sections...
   00     .sec0 
   01     .sec1 
   02     .sec4 .sec5 .sec3 
   03     .sec2 



More information about the Binutils mailing list