This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFA] SH TLS support (Take 3)


On Thu, 10 Oct 2002, kaz Kojima wrote:
> I've revised SH 32-bit TLS patch. There is no new regression for
> sh-unknown-linux-gnu, sh4-unknown-netbsdelf and sh64-unknown-elf.

Thanks.  The patch is approved with the nits below fixed; you
don't have to re-send the patch.

> [bfd/ChangeLog]

> 	(sh_elf_relocate_section): Support TLS relocs. Don't try to find
> 	.rela.got section when found already. Return false after printing
> 	error about unresolvable relocation.

Two spaces after "." ending sentence.

> 	(sh_elf_gc_sweep_hook): Support TLS relocs.
> 	(sh_elf_check_relocs): Likewise.
> 	(sh_elf_finish_dynamic_symbol): Likewise.
> 	(bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
> 	* reloc.c: Add SH TSL relocs.

Typo: TSL.

>
> [gas/ChangeLog]
> 	* config/tc-sh.c (sh_force_relocation): Make sure TLS relocs get
> 	emitted.
> 	(md_apply_fix3): Add TLS relocs.
> 	(sh_parse_name): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF and
> 	@DTPOFF.
>
> [include/ChangeLog]
> 	* include/elf/sh.h: Add SH TLS relocs.

ChangeLog goes in include/elf/, not include/.

> @@ -5835,6 +6718,29 @@ sh_elf_merge_private_data (ibfd, obfd)
>  }
>  #endif /* not sh_elf_merge_private_data */
>
> +/* Override the generic function because we need to store sh_elf_obj_tdata
> +   as the specific tdata. We set also the machine architecture from flags

Two spaces after ".".

> diff -u3prN ORIG/src/ld/testsuite/ld-sh/rd-sh.exp
>
> @@ -33,4 +33,11 @@ foreach shtest $rd_test_list {
>      # We need to strip the ".d", but can leave the dirname.
>      verbose [file rootname $shtest]
>      run_dump_test [file rootname $shtest]
> +    if [string match $srcdir/$subdir/*-dso.d $shtest] {
> +       set cmd "cp tmpdir/dump tmpdir/[file rootname [file tail $shtest]].so"
> +       send_log "$cmd\n"
> +       set cmdret [catch "exec $cmd" comp_output]
> +       send_log "$comp_output\n"
> +       # FIXME: What if it fails?  Need we do something?
> +    }
>  }

I see you went for a simpler scheme than in cris.exp; you
require that the DSO-name sorts before the tests that depend on
it rather than split out the DSO-creating tests and do them in a
separate stage before the others.  I'm not against that, but a
comment about the sort-order requirement would be in order, I
think.

> diff -u3prN ORIG/src/gas/testsuite/gas/sh/tlsd.d LOCAL/src/gas/testsuite/gas/sh/tlsd.d
> --- ORIG/src/gas/testsuite/gas/sh/tlsd.d	Thu Jan  1 09:00:00 1970
> +++ LOCAL/src/gas/testsuite/gas/sh/tlsd.d	Wed Oct  9 08:00:17 2002
> @@ -0,0 +1,54 @@
> +#objdump: -dr
> +#name: sh dynamic tls

I think you need to say "#as: -little" here and in the other gas
TLS tests, so big-endian targets don't fail the test.

Thanks again.

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]