[prev in list] [next in list] [prev in thread] [next in thread] 

List:       musl
Subject:    Re: [musl] [PATCH] crt: Add .file directive
From:       Fangrui Song <i () maskray ! me>
Date:       2020-10-30 20:54:16
Message-ID: 20201030205416.l6mx5gtx6pftz2fw () gmail ! com
[Download RAW message or body]

On 2020-10-30, Rich Felker wrote:
>On Fri, Oct 30, 2020 at 11:44:02AM -0700, Khem Raj wrote:
>> Musl linked binaries come out to be not reproducible because
>> absolute build path is seen in debug info of crti.o and crtn.o
>> This is due to the fact that these objects are built from assembly
>> source files and they are missing .file directive
>> if we add .file <filename>.s in them then debug info encodes this
>> value instead of absolute path in debug_line section

.debug_line is unrelated because there is no .loc directive in these
crti.s and crtn.s files.

Many architectures do not leave non-STT_SECTION STB_LOCAL symbols in
crti.o and crtn.o, so they don't need to be patched (even if the
maintainer agrees to add the workaround in musl, instead of fixing the
toolchain).

>Surely there should be some better way to achieve this with CFLAGS
>instead of duplication across every source file..?
>
>Rich

https://bugs.llvm.org/show_bug.cgi?id=48023 captures the nature of the
problem. You may send a message to binutils@sourceware.org how GCC/gas
should handle this situation.

LLD and gold do not synthesize STT_FILE, hence no such problem.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic