[llvm-dev] Linux/ARM: Segfault issue when we build clang sources including __thread variable using -O2 flag

Geunsik Lim via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 19:16:36 PDT 2016


> Given something like:
>
>     ldr r0, .LCPI0_0 (== pc-rel var)
>     add r0, pc
>
>     ldr r1, .LCPI0_1 (== pc-rel var)
>     add r1, pc
>

Where can we get the above assembly code?
For example, from clsload.s with "save-temps" flag? or from libcoreclr.so
 with "objdump -d" command?





On Tue, May 10, 2016 at 10:39 PM, Tim Northover <t.p.northover at gmail.com>
wrote:

> On 9 May 2016 at 23:37, Geunsik Lim <leemgs at gmail.com> wrote:
> > arm at target# objdump -d ./libcoreclr.so  | grep tls_get_addr <--- version
> > 2.25
> > 00037b70 <__tls_get_addr at plt>:
> >    a0732: f797 ea1e blx 37b70 <__tls_get_addr at plt>
>
> This is exactly what I see, so I'm not sure what you're actually looking
> for.
>
> That first line (37b70) is the PLT stub for __tls_get_addr that lives
> in libcoreclr.so. If you look at the following 3 lines, they call into
> ld-linux.so, which looks up where the real __tls_get_addr function is
> and calls that instead.
>
> In this case the real definition also happens to be in ld-linux.so,
> but that's not typical. E.g. printf would be in libc.so.
>



-- 
http://leemgs.fedorapeople.org
Don't try to avoid pain if you fail.
If you decided to face the challenges in life,
you can gain a lot by giving your best.
Cheolsang Jeong's Book & life
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160511/d7071e2e/attachment.html>


More information about the llvm-commits mailing list