This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] MIPS16 TLS binutils support
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Chung-Lin Tang <cltang at codesourcery dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Sat, 10 Dec 2011 11:45:40 +0000
- Subject: Re: [PATCH] MIPS16 TLS binutils support
- References: <4EE32C48.4050304@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com> writes:
> as aforementioned on gcc-patches, we have MIPS16 TLS implemented, and
> here are the binutils parts.
>
> It's mostly straightforward, adding the analogous TLS relocations and
> cases for MIPS16. I have also added a .tprel[d]word directive, together
> re-arranging the similar code for .dtprel[d]word, which are now used for
> laying out offset values in text for MIPS16 pc-relative loading.
>
> I'll be posting the GCC parts later on gcc-patches.
Very nice! This really is as unintrusive as new functionality gets,
so I'd like it to go on the 2.22 branch too, unless there are objections.
> @@ -16580,12 +16600,14 @@ s_cpreturn (int ignore ATTRIBUTE_UNUSED)
> demand_empty_rest_of_line ();
> }
>
> -/* Handle the .dtprelword and .dtpreldword pseudo-ops. They generate
> - a 32-bit or 64-bit DTP-relative relocation (BYTES says which) for
> - use in DWARF debug information. */
> +/* Handle the .dtprelword, .dtpreldword, .tprelword, .tpreldword
> + pseudo-ops. They generate a 32-bit or 64-bit DTP/TP-relative
> + relocation (BYTES says which) for use in either DWARF debug
> + information, or MIPS16 TLS. */
>
> static void
> -s_dtprel_internal (size_t bytes)
> +s_tls_rel_directive (const size_t bytes, const char* dirstr,
> + bfd_reloc_code_real_type rtype)
The comment should really mention the new parameters. How about:
/* Handle a .dtprelword, .dtpreldword, .tprelword or .tpreldword
pseudo-op; DIRSTR says which. The pseudo-op generates a BYTES-size
DTP- or TP-relative relocation of type RTYPE, for use in either DWARF
debug information or MIPS16 TLS. */
Also, formatting nit:
const char *dirstr
OK with those changes, thanks.
Richard