This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch gas]: Add missing parts for pdata/xdata generation
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Thu, 15 Jul 2010 02:04:37 +0100
- Subject: Re: [patch gas]: Add missing parts for pdata/xdata generation
- References: <AANLkTinOhzr1GSC397ob9a3hnJUIyOJFV7HAaPBfWGaZ@mail.gmail.com>
On 14/07/2010 20:33, Kai Tietz wrote:
> * config/obj-coff-seh.c
> (seh_getelm_data_size): New.
> (seh_read_offset): Handle negative values.
> (obj_coff_seh_push): Handle offset for save-register store.
> (obj_coff_seh_setframe): Add unwind-information for frame.
> (seh_store_elm_data): New.
> (seh_getelm_data_size): Return additionally unaligned element count.
> (seh_make_unwind_entry): Correct tweak about element count.
>
> Tested for x86_64-pc-mingw32. (Build test for i686-pc-cygwin and
> i686-pc-mingw32). Ok for apply?
There are several repeated constructs like this:
> + *puwop++ = (c->elems[i].offset & 0xff);
> + *puwop++ = ((c->elems[i].offset >> 8) & 0xff);
> + *puwop++ = ((c->elems[i].offset >> 16) & 0xff);
> + *puwop++ = ((c->elems[i].offset >> 24) & 0xff);
Are there not convenient bfd_ endian macros you could use in these cases?
Please replace with pre-existing macros if any are suitable; otherwise, OK.
cheers,
DaveK