[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER compone
From: |
i at maskray dot me |
Subject: |
[Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section |
Date: |
Mon, 21 Dec 2020 23:06:11 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26256
--- Comment #10 from Fangrui Song <i at maskray dot me> ---
(In reply to H.J. Lu from comment #8)
> Created attachment 13070 [details]
> A patch with tests
>
> Try this.
With a minor change, it'll match LLD (I place ordered sections before unordered
sections because Solaris folks said they did so).
+ /* Place ordered sections before unordered sections. */
+ if (bsec != NULL)
+ return 1;
+ else if (asec != NULL)
+ return -1;
+ return 0;
For the test case lld/test/ELF/linkorder-mixed.s , ld-new produced %t, %t1 and
%t3 now match LLD.
%t2 and %t4 still don't, but they are probably corner cases and don't matter in
practice.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, i at maskray dot me, 2020/12/16
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hjl.tools at gmail dot com, 2020/12/19
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hjl.tools at gmail dot com, 2020/12/19
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, pbrobinson at gmail dot com, 2020/12/19
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hjl.tools at gmail dot com, 2020/12/19
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hjl.tools at gmail dot com, 2020/12/19
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, i at maskray dot me, 2020/12/20
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hjl.tools at gmail dot com, 2020/12/20
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hjl.tools at gmail dot com, 2020/12/20
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hkrzesin at redhat dot com, 2020/12/21
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section,
i at maskray dot me <=
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, i at maskray dot me, 2020/12/21
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hjl.tools at gmail dot com, 2020/12/21
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, i at maskray dot me, 2020/12/22
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, hjl.tools at gmail dot com, 2020/12/22
- [Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section, i at maskray dot me, 2020/12/22