[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.
- [Bug ld/29900] New: Partial Linking removes alignment from linker directives, address@hidden, 2022/12/15
- [Bug ld/29900] Partial Linking removes alignment from linker directives, nickc at redhat dot com, 2022/12/19
- [Bug ld/29900] Partial Linking removes alignment from linker directives, address@hidden, 2022/12/19
- [Bug ld/29900] Partial Linking removes alignment from linker directives, address@hidden, 2022/12/19
- [Bug ld/29900] Partial Linking removes alignment from linker directives, address@hidden, 2022/12/19
- [Bug ld/29900] Partial Linking removes alignment from linker directives, address@hidden, 2022/12/19
- [Bug ld/29900] Partial Linking removes alignment from linker directives, nickc at redhat dot com, 2022/12/19
- [Bug ld/29900] Partial Linking removes alignment from linker directives, nickc at redhat dot com, 2022/12/19
- [Bug ld/29900] Partial Linking removes alignment from linker directives,
address@hidden <=
- [Bug ld/29900] Partial Linking removes alignment from linker directives, address@hidden, 2022/12/20
- [Bug ld/29900] Partial Linking removes alignment from linker directives, cvs-commit at gcc dot gnu.org, 2022/12/21
- [Bug ld/29900] Partial Linking removes alignment from linker directives, nickc at redhat dot com, 2022/12/21