From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>,
Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: Fangrui Song <maskray@google.com>
Subject: Re: [PATCH 3/3] install: Replace scripts/output-format.sed with objdump -f [BZ #26559]
Date: Tue, 12 Jan 2021 09:00:41 -0300 [thread overview]
Message-ID: <e338bb6a-c030-c2b7-9b7e-acfd598ec78c@linaro.org> (raw)
In-Reply-To: <87im82jtav.fsf@oldenburg2.str.redhat.com>
On 12/01/2021 08:20, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
>
>> On 28/12/2020 16:48, Fangrui Song via Libc-alpha wrote:
>>> GNU ld and gold have supported --print-output-format since 2011. glibc
>>> requires binutils>=2.25 (2015), so if LD is GNU ld or gold, we can
>>> assume the option is supported.
>>>
>>> lld is by default a cross linker supporting multiple targets. It auto
>>> detects the file format and does not need OUTPUT_FORMAT. It does not
>>> support --print-output-format.
>>>
>>> By parsing objdump -f, we can support all the three linkers.
>>
>> LGTM and this change seems orthogonal to the other lld adjustments.
>> I have checked that at least with a build for a handful of supported
>> ABIs I see no difference with ld.bfd (with multiple versions).
>
> I see a cross-build failure during the initial static link bootstrap on
> aarch64-linux-gnu during “make install”:
>
> make[2]: Entering directory '/home/bmg/src/glibc'
> aarch64-glibc-linux-gnu-gcc -shared -Wl,-dynamic-linker=/lib/ld-linux-aarch64.so.1 \
> -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both \
> -x c /dev/null -o /home/bmg/build/compilers/aarch64-linux-gnu/glibc/aarch64-linux-gnu/format.lds.so
> /home/bmg/install/compilers/aarch64-linux-gnu/lib/gcc/aarch64-glibc-linux-gnu/10.2.1/../../../../aarch64-glibc-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
> /home/bmg/install/compilers/aarch64-linux-gnu/lib/gcc/aarch64-glibc-linux-gnu/10.2.1/../../../../aarch64-glibc-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makerules:1070: /home/bmg/build/compilers/aarch64-linux-gnu/glibc/aarch64-linux-gnu/format.lds] Error 1
>
> This affects other targets as well.
>
> I guess using
>
> $(CC) -nostdlib -nostartfiles -shared -x assembler /dev/null
>
> should work on most targets here.
I haven't see it when a stage2 gcc, make install works as intended. However I
did see it now with a stage1 gcc with build-many-glibcs.py.
The -nostdlib -nostartfiles seems to fix it indeed, I am checking with a
bootstrap using build-many-glibcs.py.
next prev parent reply other threads:[~2021-01-12 12:00 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 19:48 [PATCH 0/3] Make glibc build with LLD Fangrui Song
2020-12-28 19:48 ` [PATCH 1/3] configure: Allow LD to be a linker other than GNU ld and gold Fangrui Song
2020-12-28 20:46 ` H.J. Lu
2020-12-28 21:15 ` [PATCH 1/3] configure: Allow LD to be LLD 9.0.0 or above " Fangrui Song
2020-12-28 19:48 ` [PATCH 2/3] elf: Replace a --defsym trick with an object file to be compatible with lld Fangrui Song
2021-01-11 20:06 ` Fāng-ruì Sòng
2021-01-18 22:08 ` Fāng-ruì Sòng
2021-01-19 0:03 ` H.J. Lu
2021-01-19 8:50 ` Fāng-ruì Sòng
2021-01-19 12:30 ` H.J. Lu
2021-01-20 18:51 ` Fāng-ruì Sòng
2021-01-28 1:03 ` Fāng-ruì Sòng
2021-01-29 14:38 ` Adhemerval Zanella
2021-01-29 15:29 ` H.J. Lu
2021-01-29 18:04 ` Adhemerval Zanella
2021-01-29 19:28 ` [PATCH v2] elf: Replace a --defsym trick with an object file to be compatible with LLD Fangrui Song
2021-02-01 13:19 ` Adhemerval Zanella
2021-02-01 13:45 ` H.J. Lu
2021-02-01 13:43 ` Florian Weimer
2020-12-28 19:48 ` [PATCH 3/3] install: Replace scripts/output-format.sed with objdump -f [BZ #26559] Fangrui Song
2021-01-08 19:38 ` Adhemerval Zanella
2021-01-12 11:20 ` Florian Weimer
2021-01-12 12:00 ` Adhemerval Zanella [this message]
2021-01-12 17:46 ` Fāng-ruì Sòng
2021-01-12 11:32 ` Andreas Schwab
2021-01-12 11:58 ` Florian Weimer
2020-12-28 21:11 ` [PATCH 0/3] Make glibc build with LLD H.J. Lu
2020-12-28 21:45 ` Fangrui Song
2020-12-28 21:49 ` H.J. Lu
2020-12-28 22:54 ` H.J. Lu
2021-01-05 23:03 ` Fāng-ruì Sòng
2021-01-05 23:33 ` H.J. Lu
2021-01-05 23:41 ` Fāng-ruì Sòng
2021-01-05 23:51 ` H.J. Lu
2021-01-06 0:50 ` Fāng-ruì Sòng
2021-01-06 1:43 ` H.J. Lu
2021-01-06 2:00 ` Fāng-ruì Sòng
2021-01-06 2:14 ` H.J. Lu
2021-01-05 22:57 ` Fāng-ruì Sòng
2021-01-08 5:04 ` Fāng-ruì Sòng
2021-01-08 17:09 ` H.J. Lu
2021-01-08 18:04 ` Fāng-ruì Sòng
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=e338bb6a-c030-c2b7-9b7e-acfd598ec78c@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=maskray@google.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).