bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20614: alignment problem with recent Emacs unexelf.c changes


From: Alan Modra
Subject: bug#20614: alignment problem with recent Emacs unexelf.c changes
Date: Tue, 17 Nov 2015 19:33:04 +1030
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Nov 16, 2015 at 05:59:25PM -0800, Paul Eggert wrote:
> I ran into a porting problem when using Emacs's recent unexelf.c changes in
> a picky build using GCC’s -fsanitize=undefined option. The attached patch
> worked for me, so I installed it into emacs-25. Alan, could you please check
> and/or improve this patch, and/or think about whether there might be similar
> problems elsewhere? Thanks.

The patch looks good to me, and yes, section headers ought to be
aligned to their natural alignment (4 byte for 32-bit object files,
8 byte for 64-bit objects).  .symtab should be kept aligned too, and
your patch accomplishes that as well.  Thanks for fixing this.  No
other alignment requirements come to mind.

Note that the new unexelf.c does not handle objects using .lrodata,
.ldata and .lbss or other "large sections" typically loaded well above
.bss in the address space.  The old unexelf.c didn't handle them
properly either..

-- 
Alan Modra
Australia Development Lab, IBM





reply via email to

[Prev in Thread] Current Thread [Next in Thread]