[patch][gold] Fix R_ARM_TLS_LE32 when there is no TLS segment

Rafael Espindola espindola@google.com
Thu May 27 15:28:00 GMT 2010


> You need to put tdata and tbss in both the data and tls segments.  You
> need something like
>   } :data :tls

With gold I now get

ld-new: error: load segment overlap [0x40000 -> 0x502f0] and [0x50000
-> 0x617a0]

With gnu ld I don't get an error, but I do get overlapping segments,
which is very odd:

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000000 0x00000000 0x00000000 0x000d4 0x000d4 R   0x4
  LOAD           0x008000 0x00020000 0x00020000 0x1be20 0x1be20 R E 0x8000
  LOAD           0x028000 0x00040000 0x00040000 0x102f0 0x102f0 R   0x8000
  LOAD           0x040000 0x00050000 0x00050000 0x10614 0x117a0 RW  0x8000
  TLS            0x040000 0x00050000 0x00050000 0x00180 0x00180 R   0x10

 Section to Segment mapping:
  Segment Sections...
   00
   01     .init .text .fini
   02     .rodata .nacl_rpc_methods .data.rel.ro
   03     .tdata .data .bss
   04     .tdata

I understand your desire to keep the assumption that TLS sections map
to TLS segments. Unfortunately I have to switch my attention to other
things right now.

How about this, I keep this as a NaCl local patch until next week and
then try to debug why I am getting overlapping segments and resume
this thread. Is that OK?

> Ian
>

Cheers,
-- 
Rafael Ávila de Espíndola



More information about the Binutils mailing list