This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH/RFA] SH TLS support (Revised)
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 9 Oct 2002 07:41:51 -0400 (EDT)
- Subject: Re: [PATCH/RFA] SH TLS support (Revised)
On Wed, 9 Oct 2002, kaz Kojima wrote:
> >> * config/tc-sh.c (md_apply_fix3): Add TLS relocs.
> >> (sh_parse_name): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF and
> >> @DTPOFF.
> >
> >Don't you also need to handle these relocs in
> >sh_force_relocation and sh_fix_adjustable?
>
> The TLS relocs should be handled as non-adjustable in
> sh_fix_adjustable. I'm not sure about sh_force_relocation.
They're user-specified (assembly-programmer-specified;
compiler-specified) relocations, so they are supposed to enter
the object file regardless of what optimization-opportunities
the assembler thinks there are. If the assembler finds out an
optimization opportunity for a relocation against (say) .tdata,
I don't think it is really wanted. ;-)
> It seems that there is no handling in i386_force_relocation,
> right?
Seems like a bug.
> >I see visibility isn't optimized
> >for in many places in elf32-sh.c.
>
> Sure. The more optimizations based on visibility will be needed.
> Can we add to the TODO list at this point?
Yes, that's what I meant.
> >No, please match any SH ELF target. It seems gas options like
> >"#as: -little" to each test are necessary. Perhaps a
> >command-line option to set SHcompact mode is needed too, then.
>
> I've tried this, but have a problem. sh64 objects contain .crangs
> section even with -isa=SHcompact, so the results of TLS tests
> are pretty different.
Can the .cranges section be matched by "#..."-lines? If they
can, please add them, else (for example I imagine the case is
with some readelf-tests checking section headers) use
"#target: ..." to select in each test.
> BTW, the current pure sh*-elf can't generate DSO, with the
> message "Not enough room for program headers". The all TLS tests
> fail with the same status. It isn't the problem of the test but
> is the problem of the sh-elf linker itself.
Then please match DSO-able systems in the test themselves, by
using "#target:". For the assembler tests the program headers
problem should not matter.
> OK. I prefer the scheme of the run_dump_tests but couldn't
> find cris.exp :-)
I'll take the opportunity to show everybody the path: :-)
src/ld/testsuite/ld-cris/cris.exp
Thanks.
brgds, H-P