From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13995 invoked from network); 6 Mar 2021 02:05:12 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 6 Mar 2021 02:05:12 -0000 Received: (qmail 7325 invoked by uid 550); 6 Mar 2021 02:05:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 7302 invoked from network); 6 Mar 2021 02:05:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=b81ruC0+D9FWjhmHNDiWeQfxxFb3R4VKIkJ+as7s8Y4=; b=nw4Wv8NOMvJcMNe4ey5/zWsRKqSXRWCIxfIB3zAb7wRxx2rKaF9w8IsV03Q52zEiLi gYD1Clwrqb7PJURiiC1uINdf+mNMy4s2jZDWnwHnsetzaDzwFIXeyCvofNXDkpMJtXX+ 8VkuzmWOvGqqFuAtKIBlTbPH+ICq+lIaldhZH/iHut1ElXgrxZLfscXcxq+4s6uH3Y7y oBhiiqVsdLluKL9C6xYQmmq3S0ZwEDGAKa5UmPX/J59jdvA4JSKZw66yOQXMRUXzSZsa hPIlSOP8nCtIKb3CNjwS1/WQhhrGOoaUnCKxad927KlVmoQ8/JloydAY75/kUOg8Ufie a2Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=b81ruC0+D9FWjhmHNDiWeQfxxFb3R4VKIkJ+as7s8Y4=; b=cd7lgFaOaOScvrOxlwgrsiDDri//61erMnK88++z2JQiRpXpc3IvpSMKqi9GnXYlpk gIfl4lCVFZN0fzPljSXt/GL1p0CD0vihM3K6Pn/rwMb/s55kAJswk6Sl9TRQSdrLXHCl sYoboSn3Pj/YDUN5Z4Yf2vYqhnpwZzvhAaIXod/dnNUqkzw9K4SJZlCsz4sRgxf6Gny0 vkk+fFvT0L2qjn5Td50sxA4wcpEAImozTk7ltDPIHMHbD+3PTMdMUBV/yCtSuWHIltT6 D5/C2gRGNBw8EiFsSmbvohvGn2WF6oQ6fibQGaGBqtDlmyYOve1kAa0q902mCtBLDGH3 AMVg== X-Gm-Message-State: AOAM530B8mE5pNxAJzX6yWDTmBcyrzlxnoQ/R+bjHmFaXQuLDUcbK1if ne6FKnNdEUZJNZ4r3qGUb5STD6quFqJB0A2WT5V1FnH51IRybw== X-Google-Smtp-Source: ABdhPJzTGpTqV1x7FditMBszRBvC2UhlAA2DaMVcxQny2ymlmH0wXF/WZs3rvsJb1Y5bgNdDTnrYz71ruIu+xZbxg18= X-Received: by 2002:a25:ace7:: with SMTP id x39mr7336705ybd.400.1614996297061; Fri, 05 Mar 2021 18:04:57 -0800 (PST) MIME-Version: 1.0 X-Originating-IP: [73.70.188.119] In-Reply-To: <20210306013902.2rec4xrbg4j5mikf@gmail.com> References: <2XR4N9WTZJRRB.388AF1JAC0M8E@mforney.org> <20210305150730.GN32655@brightrain.aerifal.cx> <20210305161256.GO32655@brightrain.aerifal.cx> <20210306011405.g5t2pncdcbh4ebij@gmail.com> <20210306013902.2rec4xrbg4j5mikf@gmail.com> From: Michael Forney Date: Fri, 5 Mar 2021 18:04:56 -0800 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] ld-musl-* and empty .eh_frame On 2021-03-05, Fangrui Song wrote: > The empty .eh_frame is suspicious, though. There may be two problems: > > 1. Why do you have an empty .eh_frame in an object file There is no .eh_frame in any of the object files involved (neither t.o or crt*.o), just in the final executable. It seems that GNU ld creates a .eh_frame section unless you pass --no-ld-generated-unwind-info. > 2. Why does ld.bfd create empty .eh_frame in that case (I have tried > simple examples like `.section .eh_frame,"a"` and I cannot reproduce > the empty output .eh_frame) > > If you don't share the other files, it is difficult to locate the > problem. Which files are you interested in? The recipe I showed earlier should be sufficient to reproduce the issue. You can use the standard alpine linux toolchain (using /usr/lib instead of /lib for the paths to the crt*.o files). With a musl.cc toolchain, you'll need to pass -z separate-code to get the empty PT_LOAD segment, but the empty .eh_frame is there either way.