public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org, Nick Clifton <nickc@redhat.com>
Subject: Re: [PATCH v3] elf: Set p_align to the minimum page size if possible
Date: Thu, 10 Feb 2022 13:44:58 +0100	[thread overview]
Message-ID: <38e538f6-200c-e6cc-bb64-400f4234f00b@suse.com> (raw)
In-Reply-To: <31e68092-781a-7787-cf6f-2668e47e5e61@suse.com>

On 14.01.2022 09:12, Jan Beulich wrote:
> On 29.12.2021 20:39, H.J. Lu via Binutils wrote:
>> --- /dev/null
>> +++ b/ld/testsuite/ld-elf/p_align-1.c
>> @@ -0,0 +1,25 @@
>> +#include <stdio.h>
>> +#include <stdint.h>
>> +#include <stdlib.h>
>> +
>> +#ifndef ALIGN
>> +# define ALIGN 0x800000
>> +#endif
>> +
>> +int
>> +__attribute__ ((weak))
>> +is_aligned (void *p, int align)
>> +{
>> +  return (((uintptr_t) p) & (align - 1)) == 0;
>> +}
>> +
>> +int foo __attribute__ ((aligned (ALIGN))) = 1;
> 
> Alongside newer distros I also continue to build and test binutils on an
> oldish one. gcc 4.3 looks to silently ignore[1] alignment values larger
> than 1Mb on at least 32-bit x86. Hence all 4 derived tests fail there. I
> think you want to verify that foo's alignment is actually 8Mb in the
> object file, or use an assembler source instead of a C one (albeit I can
> see that this would undermine your PIE / non-PIE test variants).

I have to admit that I find it disappointing that this and the later
reported failure on glibc 2.26 (or, as you were suggesting, an unpatched
kernel) have not been taken care of in time for 2.38. I understand that
I did not come back with results of testing your proposed workaround, but
as said in an earlier reply I don't view adding a gcc version dependency
as a viable workaround, let alone a fix. Hence I didn't see any basis for
putting time into testing that change.

Jan


  reply	other threads:[~2022-02-10 12:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29 19:39 H.J. Lu
2022-01-14  8:12 ` Jan Beulich
2022-02-10 12:44   ` Jan Beulich [this message]
2022-01-14  8:27 ` Jan Beulich
2022-01-14 13:03   ` H.J. Lu
2022-01-14 13:40     ` Jan Beulich
2022-01-14 14:02       ` H.J. Lu
2022-01-14 14:07         ` Jan Beulich
2022-01-14 14:14           ` H.J. Lu
2022-01-17 10:38             ` Jan Beulich
2022-01-17 13:44               ` [PATCH] ld: Require GCC 8.0 for p_align-1.c tests H.J. Lu
2022-01-17 13:51                 ` Jan Beulich
2022-01-17 13:54                   ` H.J. Lu
  -- strict thread matches above, loose matches on Subject: below --
2021-12-25  3:54 [PATCH v3] elf: Set p_align to the minimum page size if possible H.J. Lu
2021-12-29  0:42 ` Alan Modra
2021-12-29 19:41   ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38e538f6-200c-e6cc-bb64-400f4234f00b@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).