This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gas patch for non-octet processors
- From: Alan Modra <amodra at gmail dot com>
- To: jnielsen at ddci dot com
- Cc: binutils at sourceware dot org
- Date: Sat, 30 Jun 2012 09:58:32 +0930
- Subject: Re: gas patch for non-octet processors
- References: <OF8DFD9C83.214C981A-ON07257A22.004E6C75-C1257A2C.004C8B68@ddci.com>
On Fri, Jun 29, 2012 at 03:56:07PM +0200, jnielsen@ddci.com 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 <jnielsen@ddci.com>
* 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