Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 30 Oct 2020 13:54:16 -0700
From: Fangrui Song <i@...kray.me>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] crt: Add .file directive

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@...rceware.org how GCC/gas
should handle this situation.

LLD and gold do not synthesize STT_FILE, hence no such problem.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.