Re: [PATCH] gcov: fix __ctors_start alignment

From: Peter Oberparleiter
Date: Thu Jun 25 2009 - 09:57:08 EST


Heiko Carstens wrote:
From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>

The ctors section for each object file is eight byte aligned (on 64 bit).
However the __ctors_start symbol starts at an arbitrary address dependent
on the size of the previous sections.
Therefore the linker may add some zeroes after __ctors_start to make sure
the ctors contents are properly aligned. However the extra zeroes at the
beginning aren't expected by the code. When walking the functions pointers
contained in there and extra zeroes are added this may result in random
jumps.
So make sure that the __ctors_start symbol is always aligned as well.

Ack. And good find! :) Also with this patch applied, the x86_64 boot problem reported by Ingo Molnar no longer occurs.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/