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.