diff options
author | Claudiu Zissulescu <claziss@gmail.com> | 2023-09-15 12:57:22 +0300 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gmail.com> | 2023-09-15 12:57:22 +0300 |
commit | 0a43fbaa23a5eaf4254a51fa43ef61a6e28c9bd6 (patch) | |
tree | dfa72149ea3a4004ec931b2ec5a2d9b8c4086071 /gdb/proc-api.c | |
parent | 5a6dafd5f1110e8b642fdf65c13d8543e469a09e (diff) | |
download | gdb-0a43fbaa23a5eaf4254a51fa43ef61a6e28c9bd6.zip gdb-0a43fbaa23a5eaf4254a51fa43ef61a6e28c9bd6.tar.gz gdb-0a43fbaa23a5eaf4254a51fa43ef61a6e28c9bd6.tar.bz2 |
arc: Fix alignment of the TLS Translation Control Block
The R_ARC_TLS_LE_32 is defined as S + A + TLS_TBSS - TLS_REL, where
- S is the base address of the symbol in the memory
- A is the symbol addendum
- TLS_TBSS is the TLS Translation Control Block size (aligned)
- TLS_REL is the base of the TLS section
Given the next code snip:
__thread int data_var = 12;
__attribute__((__aligned__(128))) __thread int data_var_128 = 128;
__thread int bss_var;
__attribute__((__aligned__(256))) __thread int bss_var_256;
int __start(void)
{
return data_var + data_var_128 + bss_var + bss_var_256;
}
The current code returns different TLS_TBSS values for .tdata and
.tbss. This patch fixes this by using the linker provided tls_sec.
bfd/
* elf32-arc.c (TLS_REL): Clean up.
(TLS_TBSS): Use tls_sec alignment.
(arc_do_relocation): Check if we have valid tls_sec.
Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
Diffstat (limited to 'gdb/proc-api.c')
0 files changed, 0 insertions, 0 deletions