This is the mail archive of the binutils@sourceware.org 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 1/6] RISC-V bfd port


On Tue, Oct 11, 2016 at 04:46:06PM -0700, Andrew Waterman wrote:
> +/* Remember all PC-relative high-part relocs we've encountered to help us
> +   later resolve the corresponding low-part relocs.  */

Why?  This sort of thing is usually only needed on REL targets.

> +  /* Dynamic TLS relocations.  */
> +  HOWTO (R_RISCV_TLS_DTPMOD32,		/* type */
> +	 0,				/* rightshift */
> +	 4,				/* size */
> +	 32,				/* bitsize */
> +	 FALSE,				/* pc_relative */
> +	 0,				/* bitpos */
> +	 complain_overflow_dont,	/* complain_on_overflow */
> +	 bfd_elf_generic_reloc, 	/* special_function */
> +	 "R_RISCV_TLS_DTPMOD32",	/* name */
> +	 FALSE,				/* partial_inplace */
> +	 MINUS_ONE,			/* src_mask */
> +	 MINUS_ONE,			/* dst_mask */
> +	 FALSE),			/* pcrel_offset */

Here and in a few more howtos you set src_mask non-zero.  Again, this
is usually not correct for a RELA target.

-- 
Alan Modra
Australia Development Lab, IBM


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