return false;
/* We can't merge with a member of an output section group or merge
two sections with differing SHF_EXCLUDE or other processor and OS
- specific flags when doing a relocatable link. */
+ specific flags or with different SHF_LINK_ORDER when doing a
+ relocatable link. */
if (bfd_link_relocatable (&link_info)
&& (elf_next_in_group (out) != NULL
+ || ((elf_section_flags (in) & SHF_LINK_ORDER) != 0
+ && (elf_section_flags (out) & SHF_LINK_ORDER) != 0
+ && (elf_linked_to_section (in)->output_section
+ != elf_linked_to_section (out)->output_section))
|| ((elf_section_flags (out) ^ elf_section_flags (in))
& (SHF_MASKPROC | SHF_MASKOS)) != 0))
return false;
--- /dev/null
+#source: pr30791a.s
+#source: pr30791b.s
+#ld: -r
+#readelf: -S --wide
+
+#...
+Section Headers:
+#...
+ \[[ 0-9]+\] __patchable_function_entries[ \t]+PROGBITS[ \t0-9a-f]+WAL.*
+#...
+ \[[ 0-9]+\] __patchable_function_entries[ \t]+PROGBITS[ \t0-9a-f]+WAL.*
+#...
+ \[[ 0-9]+\] __patchable_function_entries[ \t]+PROGBITS[ \t0-9a-f]+WAL.*
+#...
+ \[[ 0-9]+\] __patchable_function_entries[ \t]+PROGBITS[ \t0-9a-f]+WAL.*
+#pass
--- /dev/null
+ .section .text.a,"ax",%progbits
+ .globl a
+ .type a, %function
+a:
+.LFB0:
+ .section __patchable_function_entries,"awo",%progbits,.LPFE0
+ .dc.a .LPFE0
+ .section .text.a
+.LPFE0:
+ .byte 0
+ .section .text.b,"ax",%progbits
+ .globl b
+ .type b, %function
+b:
+.LFB1:
+ .section __patchable_function_entries,"awo",%progbits,.LPFE1
+ .dc.a .LPFE1
+ .section .text.b
+.LPFE1:
+ .byte 0
--- /dev/null
+#source: pr30791c.s
+#source: pr30791d.s
+#ld: -r
+#readelf: -S --wide
+
+#failif
+#...
+ \[[ 0-9]+\] __patchable_function_entries[ \t]+PROGBITS[ \t0-9a-f]+WAL.*
+#...
+ \[[ 0-9]+\] __patchable_function_entries[ \t]+PROGBITS[ \t0-9a-f]+WAL.*
+#...
--- /dev/null
+ .section .text.c,"ax",%progbits
+ .globl c
+ .type c, %function
+c:
+.LFB0:
+ .section __patchable_function_entries,"awo",%progbits,.LPFE0
+ .dc.a .LPFE0
+ .section .text.c
+.LPFE0:
+ .byte 0
+ .section .text.d,"ax",%progbits
+ .globl d
+ .type d, %function
+d:
+.LFB1:
+ .section __patchable_function_entries,"awo",%progbits,.LPFE1
+ .dc.a .LPFE1
+ .section .text.d
+.LPFE1:
+ .byte 0
--- /dev/null
+ .text
+ .globl a
+ .type a, %function
+a:
+.LFB0:
+ .section __patchable_function_entries,"awo",%progbits,.LPFE0
+ .dc.a .LPFE0
+ .text
+.LPFE0:
+ .byte 0
+ .text
+ .globl b
+ .type b, %function
+b:
+.LFB1:
+ .section __patchable_function_entries,"awo",%progbits,.LPFE1
+ .dc.a .LPFE1
+ .text
+.LPFE1:
+ .byte 0
--- /dev/null
+ .text
+ .globl c
+ .type c, %function
+c:
+.LFB0:
+ .section __patchable_function_entries,"awo",%progbits,.LPFE0
+ .dc.a .LPFE0
+ .text
+.LPFE0:
+ .byte 0
+ .text
+ .globl d
+ .type d, %function
+d:
+.LFB1:
+ .section __patchable_function_entries,"awo",%progbits,.LPFE1
+ .dc.a .LPFE1
+ .text
+.LPFE1:
+ .byte 0