* [PATCH] Makefile: Force GNU hashing
@ 2023-08-14 4:39 Mayuresh Chitale
2023-08-14 7:40 ` Andreas Schwab
0 siblings, 1 reply; 8+ messages in thread
From: Mayuresh Chitale @ 2023-08-14 4:39 UTC (permalink / raw)
To: opensbi
The Yocto QA step verifies that binaries and DSOs use DT_GNU_HASH rather than
DT_HASH. If the linker is called directly, then we need to make sure to pass in
the hashing style.
Signed-off-by: Jeff Law <jlaw@ventanamicro.com>
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 730dbd9..7fb8d2d 100644
--- a/Makefile
+++ b/Makefile
@@ -161,7 +161,7 @@ ifeq ($(LD_IS_LLD),y)
RELAX_FLAG = -mno-relax
USE_LD_FLAG = -fuse-ld=lld
else
-USE_LD_FLAG = -fuse-ld=bfd
+USE_LD_FLAG = -fuse-ld=bfd -Wl,--hash-style=gnu
endif
# Check whether the linker supports creating PIEs
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] Makefile: Force GNU hashing
2023-08-14 4:39 [PATCH] Makefile: Force GNU hashing Mayuresh Chitale
@ 2023-08-14 7:40 ` Andreas Schwab
2023-08-14 13:06 ` Jeff Law
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2023-08-14 7:40 UTC (permalink / raw)
To: opensbi
On Aug 14 2023, Mayuresh Chitale wrote:
> The Yocto QA step verifies that binaries and DSOs use DT_GNU_HASH rather than
> DT_HASH. If the linker is called directly, then we need to make sure to pass in
> the hashing style.
Why does it matter? The ultimate output is a flat binary.
--
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Makefile: Force GNU hashing
2023-08-14 7:40 ` Andreas Schwab
@ 2023-08-14 13:06 ` Jeff Law
2023-08-14 13:08 ` Andreas Schwab
0 siblings, 1 reply; 8+ messages in thread
From: Jeff Law @ 2023-08-14 13:06 UTC (permalink / raw)
To: opensbi
On 8/14/23 01:40, Andreas Schwab wrote:
> On Aug 14 2023, Mayuresh Chitale wrote:
>
>> The Yocto QA step verifies that binaries and DSOs use DT_GNU_HASH rather than
>> DT_HASH. If the linker is called directly, then we need to make sure to pass in
>> the hashing style.
>
> Why does it matter? The ultimate output is a flat binary.
It matters because the Yocto QA step will fail. It doesn't affect the
behavior of the resulting image though, IIRC.
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Makefile: Force GNU hashing
2023-08-14 13:06 ` Jeff Law
@ 2023-08-14 13:08 ` Andreas Schwab
2023-08-14 13:11 ` Jeff Law
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2023-08-14 13:08 UTC (permalink / raw)
To: opensbi
On Aug 14 2023, Jeff Law wrote:
> On 8/14/23 01:40, Andreas Schwab wrote:
>> On Aug 14 2023, Mayuresh Chitale wrote:
>>
>>> The Yocto QA step verifies that binaries and DSOs use DT_GNU_HASH rather than
>>> DT_HASH. If the linker is called directly, then we need to make sure to pass in
>>> the hashing style.
>> Why does it matter? The ultimate output is a flat binary.
> It matters because the Yocto QA step will fail.
Why does it even look at it? It's only an intermediate build product.
--
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Makefile: Force GNU hashing
2023-08-14 13:08 ` Andreas Schwab
@ 2023-08-14 13:11 ` Jeff Law
2023-08-14 13:15 ` Andreas Schwab
0 siblings, 1 reply; 8+ messages in thread
From: Jeff Law @ 2023-08-14 13:11 UTC (permalink / raw)
To: opensbi
On 8/14/23 07:08, Andreas Schwab wrote:
> On Aug 14 2023, Jeff Law wrote:
>
>> On 8/14/23 01:40, Andreas Schwab wrote:
>>> On Aug 14 2023, Mayuresh Chitale wrote:
>>>
>>>> The Yocto QA step verifies that binaries and DSOs use DT_GNU_HASH rather than
>>>> DT_HASH. If the linker is called directly, then we need to make sure to pass in
>>>> the hashing style.
>>> Why does it matter? The ultimate output is a flat binary.
>> It matters because the Yocto QA step will fail.
>
> Why does it even look at it? It's only an intermediate build product.
Because that's how Yocto works? Hell if I know and it wasn't something
I wanted to spend a lot of time investigating. Fighting with Yocto over
something that doesn't change the behavior of the resulting image isn't
something I felt was worth a lot of my time -- for various reasons.
jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Makefile: Force GNU hashing
2023-08-14 13:11 ` Jeff Law
@ 2023-08-14 13:15 ` Andreas Schwab
2023-08-14 17:26 ` Jeff Law
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2023-08-14 13:15 UTC (permalink / raw)
To: opensbi
On Aug 14 2023, Jeff Law wrote:
> On 8/14/23 07:08, Andreas Schwab wrote:
>> On Aug 14 2023, Jeff Law wrote:
>>
>>> On 8/14/23 01:40, Andreas Schwab wrote:
>>>> On Aug 14 2023, Mayuresh Chitale wrote:
>>>>
>>>>> The Yocto QA step verifies that binaries and DSOs use DT_GNU_HASH rather than
>>>>> DT_HASH. If the linker is called directly, then we need to make sure to pass in
>>>>> the hashing style.
>>>> Why does it matter? The ultimate output is a flat binary.
>>> It matters because the Yocto QA step will fail.
>> Why does it even look at it? It's only an intermediate build product.
> Because that's how Yocto works?
Whatever Yocto is, it must be doing something strange.
--
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Makefile: Force GNU hashing
2023-08-14 13:15 ` Andreas Schwab
@ 2023-08-14 17:26 ` Jeff Law
2023-08-15 7:17 ` Andreas Schwab
0 siblings, 1 reply; 8+ messages in thread
From: Jeff Law @ 2023-08-14 17:26 UTC (permalink / raw)
To: opensbi
On 8/14/23 07:15, Andreas Schwab wrote:
> On Aug 14 2023, Jeff Law wrote:
>
>> On 8/14/23 07:08, Andreas Schwab wrote:
>>> On Aug 14 2023, Jeff Law wrote:
>>>
>>>> On 8/14/23 01:40, Andreas Schwab wrote:
>>>>> On Aug 14 2023, Mayuresh Chitale wrote:
>>>>>
>>>>>> The Yocto QA step verifies that binaries and DSOs use DT_GNU_HASH rather than
>>>>>> DT_HASH. If the linker is called directly, then we need to make sure to pass in
>>>>>> the hashing style.
>>>>> Why does it matter? The ultimate output is a flat binary.
>>>> It matters because the Yocto QA step will fail.
>>> Why does it even look at it? It's only an intermediate build product.
>> Because that's how Yocto works?
>
> Whatever Yocto is, it must be doing something strange.
There are many things about Yocto that are strange at best. IMHO Yocto
is a necessary evil as part of the bring-up process but you want to get
away from it as soon as possible :-)
If you've never worked with it, consider yourself lucky. Think of it as
a mini distro, but with a unique and complex way of describing the
components of the distro and how they're patched/built, how qa works, etc.
jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-08-15 7:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 4:39 [PATCH] Makefile: Force GNU hashing Mayuresh Chitale
2023-08-14 7:40 ` Andreas Schwab
2023-08-14 13:06 ` Jeff Law
2023-08-14 13:08 ` Andreas Schwab
2023-08-14 13:11 ` Jeff Law
2023-08-14 13:15 ` Andreas Schwab
2023-08-14 17:26 ` Jeff Law
2023-08-15 7:17 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox