bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/29900] Partial Linking removes alignment from linker directives


From: address@hidden
Subject: [Bug ld/29900] Partial Linking removes alignment from linker directives
Date: Tue, 20 Dec 2022 19:44:05 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29900

--- Comment #6 from Denys Linke <denys.linke@ipg-automotive.com> ---
Hi Nick,

thanks for the patch. I can confirm, that it now preserves the .drectve section
when doing partial linking. The output of dumpbin.exe now shows this:
>> dumpbin /directives linked.o
> Microsoft (R) COFF/PE Dumper Version 14.23.28107.0
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> Dump of file linked.o
> 
> File Type: COFF OBJECT
> 
>    Linker Directives
>    -----------------
>    -aligncomm:var,2
>    -aligncomm:aligned_var,5
> 
>   Summary
>            0 .bss
>            0 .data
>           30 .drectve
>            0 .rdata
>           20 .rdata$zzz
>            0 .text

Notice the new line "0 .rdata" that didn't exist before too.

> Not being a PE expert I am not sure what should happen when you partially
> link two or more files containing .drectve sections.  Should the contents
> just be concatenated together, or is there more to it than that ?

I am not a PE expert either but for me your patch fixes this issue.
However, this leads me to the next problem which is related to objcopy:
https://sourceware.org/bugzilla/show_bug.cgi?id=29923

Just in case someone is interested, I will attach the new version of linked.o
that has been created by the patched ld.

Cheers
Denys

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]