diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2009-01-07 03:28:45 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2009-01-07 03:28:45 +0000 |
commit | 1bc86aea2807866337def70b2e31cb16fbfd1e8d (patch) | |
tree | f5c78aad44e6ff2ff37d04021732c7278729910e /bfd/elf32-cris.c | |
parent | 88fe28bd767847d61c34ff4595d672609d76174a (diff) | |
download | gdb-1bc86aea2807866337def70b2e31cb16fbfd1e8d.zip gdb-1bc86aea2807866337def70b2e31cb16fbfd1e8d.tar.gz gdb-1bc86aea2807866337def70b2e31cb16fbfd1e8d.tar.bz2 |
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
the program, the known offset starts at the negative size of the
TLS section.
<case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
Similar.
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r-- | bfd/elf32-cris.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index ea268fc..dbc00ba 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1721,8 +1721,9 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, bfd_vma off; /* The symbol is defined in the program, so just write - (1, known_tpoffset) into the GOT. */ + (1, -prog_tls_size+known_tpoffset) into the GOT. */ relocation -= elf_hash_table (info)->tls_sec->vma; + relocation -= elf_hash_table (info)->tls_sec->size; if (h != NULL) { @@ -1872,8 +1873,9 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, bfd_vma off; /* The symbol is defined in the program, so just write - the known_tpoffset into the GOT. */ + the -prog_tls_size+known_tpoffset into the GOT. */ relocation -= elf_hash_table (info)->tls_sec->vma; + relocation -= elf_hash_table (info)->tls_sec->size; if (h != NULL) off = h->got.offset; @@ -2001,7 +2003,9 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, /* NULL if we had an error. */ relocation -= elf_hash_table (info)->tls_sec == NULL - ? 0 : elf_hash_table (info)->tls_sec->vma; + ? 0 + : (elf_hash_table (info)->tls_sec->vma + + elf_hash_table (info)->tls_sec->size); /* The TLS-relative offset is the relocation. */ break; |