1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00
llvm-mirror/test/MC
Fangrui Song 75db90da40 [MC][ELF] Error for sh_type, sh_flags or sh_entsize change
Heads-up message: https://lists.llvm.org/pipermail/llvm-dev/2020-February/139390.html

GNU as started to emit warnings for changed sh_type or sh_flags in 2000.
GNU as>=2.35 will emit errors for most sh_type/sh_flags change, and error for entsize change.

Some cases remain warnings for legacy reasons:

   .section .init_array,"ax", @progbits
   .section .init_array,"ax", @init_array
   # And some obscure sh_flags changes (OS/Processor specific flags)

The rationale of a diagnostic (warning or error) is that sh_type,
sh_flags or sh_entsize changes usually indicate user errors. The values
are taken from the first .section directive. Successive directives are ignored.

We just try to be rigid and emit errors for all sh_type/sh_flags/sh_entsize change.

A possible improvement in the future is to reuse
llvm-readobj/ELFDumper.cpp:getSectionTypeString so that we can name the
type in the diagnostics.

Reviewed By: psmith

Differential Revision: https://reviews.llvm.org/D73999
2020-02-21 15:44:14 -08:00
..
AArch64 [AArch64][SVE] Add intrinsics for SVE2 bitwise ternary operations 2020-02-21 12:15:51 -05:00
AMDGPU [AMDGPU] Use @LINE for error checking in gfx10 assembler tests 2020-02-07 18:27:07 +00:00
ARM [ARM] Add initial support for Custom Datapath Extension (CDE) 2020-02-17 15:39:16 +00:00
AsmParser [AsmParser] Make generic directives and aliases case insensitive. 2020-01-17 11:02:56 +00:00
AVR [MC][AVR] Fix AVR test following 740bc366 2020-02-12 14:56:09 +00:00
BPF
COFF Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00
Disassembler [ARM] Add initial support for Custom Datapath Extension (CDE) 2020-02-17 15:39:16 +00:00
ELF [MC][ELF] Error for sh_type, sh_flags or sh_entsize change 2020-02-21 15:44:14 -08:00
Hexagon [Hexagon] v67+ HVX register pairs should support either direction 2020-02-14 12:43:43 -06:00
Lanai
MachO Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00
Mips Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00
MSP430
PowerPC Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00
RISCV [MC] De-capitalize another set of MCStreamer::Emit* functions 2020-02-14 19:26:52 -08:00
Sparc
SystemZ
WebAssembly [WebAssembly] Use llvm::Optional to store optional symbol attributes. NFC. 2020-02-19 17:25:33 -08:00
X86 Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00