public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH 0/3] Improve lld support and current status
Date: Wed, 27 Oct 2021 16:37:31 -0700	[thread overview]
Message-ID: <20211027233731.2nphydkpzrxr7v35@google.com> (raw)
In-Reply-To: <87lf2ejdnw.fsf@linux.ibm.com>


On 2021-10-27, Tulio Magno Quites Machado Filho wrote:
>Fangrui Song via Libc-alpha <libc-alpha@sourceware.org> writes:
>
>> On 2021-10-26, Adhemerval Zanella wrote:
>>>The powerpc64le fails at libc.so start:
>>>
>>>  (gdb) bt
>>>  #0  0x00007ffff7f2a980 in __gep_setup___vmx__sigjmp_save ()
>>>    from
>>>  /home/azanella/glibc/build/powerpc64le-linux-gnu-power9-lld/libc.so.6
>>>  #1  0x00007ffff7d7ac5c in __libc_start_call_main ()
>>>     from
>>>  /home/azanella/glibc/build/powerpc64le-linux-gnu-power9-lld/libc.so.6
>
>This is a local call from libc.so to libc.so.
>It should be using the local entry point for __vmx__sigjmp_save.
>
>>>  #2  0x00007ffff7d7ae90 in __libc_start_main_impl ()
>>>     from
>>>  /home/azanella/glibc/build/powerpc64le-linux-gnu-power9-lld/libc.so.6
>>>  #3  0x0000000000000000 in ?? ()
>>>  (gdb) disas
>>>  Dump of assembler code for function __gep_setup___vmx__sigjmp_save:
>>>  => 0x00007ffff7f2a980 <+0>:     .long 0x613ffe6
>>>     0x00007ffff7f2a984 <+4>:     li      r12,-1280
>
>This is a pla, but this GDB isn't able to disassemble it.  This instruction
>shouldn't be used unless when configuring glibc using --with-cpu=power10.
>
>>>And powerpc64-linux-gnu fails on dynamic loaders start:
>>>
>>>  (gdb) bt
>>>  #0  0x00007ffff7ffa9a8 in _start ()
>>>  (gdb) disas
>>>  Dump of assembler code for function _start:
>>>  => 0x00007ffff7ffa9a8 <+0>:     .long 0x0
>>>     0x00007ffff7ffa9ac <+4>:     .long 0x0
>>>     0x00007ffff7ffa9b0 <+8>:     .long 0x0
>>>     0x00007ffff7ffa9b4 <+12>:    .long 0x0
>
>I've been told that LLD doesn't support the powerpc ELFv1 yet.

You are right:) The incomplete PowerPC64 ELF v1 support was removed by
https://reviews.llvm.org/D46316 (2018-05).  Is there remaining ELF v1
usage for powerpc64le in glibc?

(I only know some 64-bit ELF v2 and some 32-bit, but know really little about 64-bit ELF v1.)

Legacy ELF v1 is also the issue that powerpc64 big-endian Linux kernel
cannot be linked with LLD (https://github.com/ClangBuiltLinux/linux/issues/602).

There is little benefit retroactively adding ELF v1 support to LLD, so
migration to ELF v2 will be nice :)

>> CCed the powerpc maintainer.
>
>Thanks!
>
>-- 
>Tulio Magno

  parent reply	other threads:[~2021-10-27 23:37 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 20:03 Adhemerval Zanella
2021-10-26 20:03 ` [PATCH 1/3] elf: Disable ifuncmain{1,5,5pic,5pie} when using LLD Adhemerval Zanella
2021-10-29 19:49   ` Fangrui Song
2021-10-26 20:03 ` [PATCH 2/3] Fix LIBC_PROG_BINUTILS for -fuse-ld=lld Adhemerval Zanella
2021-10-26 20:48   ` Fangrui Song
2021-10-27 11:42     ` Adhemerval Zanella
2021-10-26 20:03 ` [PATCH 3/3] Check if linker also support -mtls-dialect=gnu2 Adhemerval Zanella
2021-10-27  2:04   ` Fāng-ruì Sòng
2021-10-29  0:56     ` Fāng-ruì Sòng
2021-10-26 20:33 ` [PATCH 0/3] Improve lld support and current status Fangrui Song
2021-10-27 13:11   ` Adhemerval Zanella
2021-10-28  1:06     ` Fangrui Song
2021-10-28  1:18       ` Fangrui Song
2021-10-28 17:40         ` Adhemerval Zanella
2021-10-28 11:48       ` Adhemerval Zanella
2021-10-27 22:39   ` Tulio Magno Quites Machado Filho
2021-10-27 22:50     ` Tulio Magno Quites Machado Filho
2021-11-05  7:23       ` lld status with powerpc64 Fangrui Song
2021-11-05  7:45         ` Fangrui Song
2021-11-05 13:58         ` Adhemerval Zanella
2021-11-05 19:32           ` Adhemerval Zanella
2021-11-05 19:38             ` H.J. Lu
2021-11-05 19:40               ` H.J. Lu
2021-11-05 19:50               ` Fāng-ruì Sòng
2021-11-07 14:24           ` Bill Schmidt
2021-11-08 11:37             ` Adhemerval Zanella
2021-11-08 13:26               ` Bill Schmidt
2021-11-08 13:54                 ` Adhemerval Zanella
2021-11-08 13:59                   ` Bill Schmidt
2021-11-08 14:11                     ` Adhemerval Zanella
2021-11-08 14:12                       ` Bill Schmidt
     [not found]                       ` <OFD215FC7A.323066CE-ON00258787.0051DA95-00258787.00532945@ibm.com>
2021-11-08 22:38                         ` Fangrui Song
2021-11-09 12:20                           ` Adhemerval Zanella
2021-10-27 23:37     ` Fangrui Song [this message]
2021-10-28 17:27       ` [PATCH 0/3] Improve lld support and current status Tulio Magno Quites Machado Filho

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=20211027233731.2nphydkpzrxr7v35@google.com \
    --to=maskray@google.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=tuliom@linux.ibm.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).