[00/22] ELF: correct handling of simplified section directives

Message ID 5e1fe3bc-78ca-4c54-a19c-f8efa015f839@suse.com
Headers
Series ELF: correct handling of simplified section directives |

Message

Jan Beulich Dec. 15, 2023, 11:59 a.m. UTC
  Various targets override .bss (many), .text, or .data (a few) handling,
and sadly more often than not these overrides break things: In some
cases .previous doesn't work as intended, while in other cases the
sub-section specifier that ELF allows also for .bss for isn't recognized.
Fix this (first primarily for .bss, then for .text/.data), putting in
place tests to cover these pretty universal ELF aspects.

Speaking of "universal ELF aspects": Three targets (csky, mcore, and
spu) handle .bss much like .lcomm. There surely are reasons for this,
but it feels at best odd.

01: Arm: drop .bss override
02: Arm64: drop .bss override
03: RISC-V: drop .bss override
04: IA64: drop .bss override
05: bfin: drop .bss override
06: m32c: drop .bss override
07: m68k: drop .bss override
08: microblaze: drop/restrict override of .text, .data, and .bss
09: rl78: drop .bss override
10: rx: drop .bss override
11: s390: drop .bss override
12: score: drop .bss override
13: visium: drop .bss and .skip overrides
14: z80: drop .bss override
15: ELF: test certain .bss usages
16: v850: drop .bss override
17: gas: correct .bss documentation for non-ELF
18: d30v: fix .text/.data interaction with .previous
19: hppa/ELF: fix .text/.data interaction with .previous
20: nios2: fix .text/.data interaction with .previous
21: pru: fix .text/.data interaction with .previous
22: ELF: test certain .text/.data usages

Jan
  

Comments

Alan Modra Jan. 2, 2024, 12:40 a.m. UTC | #1
On Fri, Dec 15, 2023 at 12:59:39PM +0100, Jan Beulich wrote:
> Various targets override .bss (many), .text, or .data (a few) handling,
> and sadly more often than not these overrides break things: In some
> cases .previous doesn't work as intended, while in other cases the
> sub-section specifier that ELF allows also for .bss for isn't recognized.
> Fix this (first primarily for .bss, then for .text/.data), putting in
> place tests to cover these pretty universal ELF aspects.

Looks good to me.