Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] TLS support

Hi Eugene,

looking deeper at the code, it appears that the code in dwarfecomp.c (the function op_push_tls_address()) does not fit for our OS. And it seems to me that the code of that function is not conform to the generic dwarf description of OP_form_tls_address: normally, the value at the top of the stack is blindly passed to a dedicated routine that returns the address of the TLS variable.

The current implementation of op_push_tls_address() does the assumption that the top value of the stack is an offset in the TLS data area. The base address of the TLS area is returned by the dedicated routine get_tls_address(). The two values are pushed onto the stack, with an addition operator. This works for processes linux TLS, but such a computation does not fit for our TLS implementation in all cases.

I tried to defer the management of the OP_form_tls_address opcode in vm.c in order to know the top value of stack to pass to the dedicated routine, but I just figured out that the VM code runs at client site. So I would have to update all our clients to support this new OP_form_tls_address opcode for a SFT_CMD_LOCATION command.

Am right in the analysis or do I miss something?

Regards,

Benoit


On 01/15/2015 8:27 PM, Eugene Tarassov wrote:
Hi Benoit,

The function is ELF-specific - it takes ELF_File as argument. ELF-specific declarations don't belong to the context interface - it is supposed to be generic.

You still can overwrite easily the routine by substituting elf-loader.c with something else in your Makefile.

If you want to use both open source and custom versions at same time, you will need a multiplexer for elf-loader.h.

Regards,
Eugene


-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Benoit Perrin
Sent: Thursday, January 15, 2015 6:29 AM
To: tcf-dev@xxxxxxxxxxx
Subject: [tcf-dev] TLS support

Hi tcf-dev,

I have to implement the support of the Thread Local Storage for our OS. The way
the TLS is implemented for our OS is different from the way that is implemented
currently in TCF the agent (for linux OS), i.e. I have to implement my own
get_tls_address() function.

Can the current implementation be moved to the context interface, as a
context_get_tls_address() routine? Such that I can overwrite easily the routine
for my contexts. Or is there a better way?

Regards,

Benoit Perrin

--
Benoit Perrin, Senior Member of Technical Staff, Wind River
direct +33 297.427.375
_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev


--
Benoit Perrin, Senior Member of Technical Staff, Wind River
direct +33 297.427.375


Back to the top