bug-binutils
[Top][All Lists]
Advanced

[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: Fri, 14 Aug 2020 18:35:44 +0000

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

--- Comment #2 from Fangrui Song <i at maskray dot me> ---
There is a related issue.

>a.s<<e cat
 .global _start
 _start:

 .section .text.bar,"a",@progbits
 .byte 2
 .section .text.foo,"a",@progbits
 .byte 1
 .section .ro.foo,"ao",@progbits,.text.foo
 .byte 1
 .section .ro.bar,"ao",@progbits,.text.bar
 .byte 2
e
>a.lds echo 'SECTIONS { .ro : {*(.ro.bar) *(.ro.foo)} .text : {*(.text.foo) 
>*(.text.bar)} }'
as a.s -o a.o       # >=2.35
ld.bfd -T a.lds a.o -o a
readelf -W -x .text -x .ro a

Hex dump of section '.ro':
  0x00000000 0102                                ..

Hex dump of section '.text':
  0x00000038 0102                                ..

However, I don't expect ld to reorder .ro.foo before .ro.bar because
*(.ro.bar) *(.ro.foo) clearly expresses an order.

The current asection::map_header.link_order representation does not take into
account different input section descriptions.

-- 
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]