This is the mail archive of the 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: gas patch for non-octet processors

On Fri, Jun 29, 2012 at 03:56:07PM +0200, wrote:
> Function frag_offset_fixed_p in frags.[ch] returns an offset through its 
> last parameter. The parameter type is bfd_vma which is unsigned. The only 
> calls to the function are in expr.c; the offset is returned to local 
> variables frag_off which are also of type bfd_vma. The variables frag_off 
> are divided by OCTETS_PER_BYTE; the problem is that these divisions are 
> unsigned as a result of the use of bfd_vma. Dividing these offsets must be 
> done signed. No actual division takes place when OCTETS_PER_BYTE = 1 so 
> this problem only manifests itself when OCTETS_PER_BYTE > 1.

Thanks!  I have applied your patch using this ChangeLog entry.

2012-06-30  Johan Olmutz Nielsen  <>

	* frags.h (frag_offset_fixed_p): Update prototype.
	* frags.c (frag_offset_fixed_p): Change type of "offset" to offsetT.
	* expr.c (expr, resolve_expression): Likewise for frag_off var.

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]