On Wed, Aug 31, 2016 at 5:33 PM, Nadav Har'El wrote:
> I'm more worried about the symbol(sym) part of this code... What if there
> is no symbol involved? In this case (again see readelf --relocs for your
> object), there is no object...
>
> I think the code involved is the one added in commit
>
On Wed, Aug 31, 2016 at 5:13 PM, Benoît Canet
wrote:
>case R_X86_64_TPOFF64:
>// FIXME: assumes TLS segment comes before DYNAMIC segment
>
I'm not sure this code even runs when loading a shared object. I think it
only runs when loading the kernel, and there is another piece of code w
case R_X86_64_TPOFF64:
// FIXME: assumes TLS segment comes before DYNAMIC segment
This is not the case:
See in the dump:
000c8d90 :
c8d90: 48 8b 0d 29 72 38 00mov0x387229(%rip),%rcx#
44ffc0 <_DYNAMIC+0x200>
c8d97: 64 48 8b 09 mov
This is what I saw in the code managing the flags.
By anyway I think you are right and shared is an "impasse".
On Wed, Aug 31, 2016 at 4:06 PM, Nadav Har'El wrote:
>
> On Wed, Aug 31, 2016 at 4:26 PM, Benoît Canet > wrote:
>
>>
>> Buildmode shared alone crash.
>>
>>
>>
> the flags are |= betwe
On Wed, Aug 31, 2016 at 4:26 PM, Benoît Canet
wrote:
>
> Buildmode shared alone crash.
>
>
>
the flags are |= between them.
>
This is not what I see in https://golang.org/src/cmd/go/build.go
But it seems these two options indeed have a funny interaction between them
- shared enables "dynlink" w
On Wed, Aug 31, 2016 at 4:26 PM, Benoît Canet
wrote:
>
>
> Go use it's own tls see: http://blog.altoros.com/golang-internals-part-5-
> runtime-bootstrap-process.html
>
Thanks. Interesting.
It is very sad, and surprising, that Go does this: If I understand
correctly, it only has two variables in
Buildmode shared alone crash.
the flags are |= between them.
Go use it's own tls see:
http://blog.altoros.com/golang-internals-part-5-runtime-bootstrap-process.html
On Wed, Aug 31, 2016 at 3:22 PM, Nadav Har'El wrote:
>
> On Wed, Aug 31, 2016 at 4:05 PM, Benoit Canet com> wrote:
>
>> The c-sh
On Wed, Aug 31, 2016 at 4:05 PM, Benoit Canet <
benoit.canet.cont...@gmail.com> wrote:
> The c-shared is intented to build C libraries hence it
> does not export main and it's initialization does not
> set the fs register with arch_prctl() leading to a crash.
>
> Use -buildmode=shared -buildmode=p
The c-shared is intented to build C libraries hence it
does not export main and it's initialization does not
set the fs register with arch_prctl() leading to a crash.
Use -buildmode=shared -buildmode=pie to produce a library
which export main and is position independant while having
and init calli