[PATCH] x32: Align the .note.gnu.property section to 4 bytes
H.J. Lu
hjl.tools@gmail.com
Fri Aug 10 18:26:00 GMT 2018
On Fri, Aug 3, 2018 at 3:49 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> The .note.gnu.property section should be aligned to 4 bytes for x32.
>
> * testsuite/ld-x86-64/property-x86-3.s: Use ".p2align 2" to
> align .note.gnu.property section if __64_bit__ is undefined.
> ---
> ld/ChangeLog | 5 +++++
> ld/testsuite/ld-x86-64/property-x86-3.s | 4 ++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/ld/ChangeLog b/ld/ChangeLog
> index 1173c03dac..d1a15df224 100644
> --- a/ld/ChangeLog
> +++ b/ld/ChangeLog
> @@ -1,3 +1,8 @@
> +2018-08-03 H.J. Lu <hongjiu.lu@intel.com>
> +
> + * testsuite/ld-x86-64/property-x86-3.s: Use ".p2align 2" to
> + align .note.gnu.property section if __64_bit__ is undefined.
> +
> 2018-08-02 Nick Clifton <nickc@redhat.com>
>
> PR 23463
> diff --git a/ld/testsuite/ld-x86-64/property-x86-3.s b/ld/testsuite/ld-x86-64/property-x86-3.s
> index be8cc9efb1..239cf622ff 100644
> --- a/ld/testsuite/ld-x86-64/property-x86-3.s
> +++ b/ld/testsuite/ld-x86-64/property-x86-3.s
> @@ -41,7 +41,11 @@
> 3:
>
> .section ".note.gnu.property", "a"
> +.ifdef __64_bit__
> .p2align 3
> +.else
> + .p2align 2
> +.endif
> .long 1f - 0f /* name length. */
> .long 3f - 1f /* data length. */
> /* NT_GNU_PROPERTY_TYPE_0 */
> --
> 2.17.1
>
I backported it to 2.31 branch.
--
H.J.
More information about the Binutils
mailing list