1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/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
..
MCDisassembler
MCParser [MC][ELF] Error for sh_type, sh_flags or sh_entsize change 2020-02-21 15:44:14 -08:00
CMakeLists.txt
ConstantPools.cpp [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00
ELFObjectWriter.cpp [MC][ELF] Rename MC related "Associated" to "LinkedToSym" 2020-02-06 11:31:04 -08:00
LLVMBuild.txt
MachObjectWriter.cpp [MachO] Pad section data to pointer size bytes 2020-02-11 14:52:21 -08:00
MCAsmBackend.cpp
MCAsmInfo.cpp [MC] De-capitalize another set of MCStreamer::Emit* functions 2020-02-14 19:26:52 -08:00
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
MCAsmInfoWasm.cpp
MCAsmInfoXCOFF.cpp
MCAsmMacro.cpp
MCAsmStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MCAssembler.cpp [RISCV] Fix evaluating %pcrel_lo against global and weak symbols 2020-01-23 02:05:48 +00:00
MCCodeEmitter.cpp
MCCodeView.cpp [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00
MCContext.cpp [MC] Add MCSection::NonUniqueID and delete one MCContext::getELFSection overload 2020-02-14 20:25:52 -08:00
MCDwarf.cpp [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MCExpr.cpp [Hexagon][NFC] Rename VK_Hexagon_PCREL to VK_PCREL 2020-02-19 09:52:58 -06:00
MCFragment.cpp
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp
MCLabel.cpp
MCLinkerOptimizationHint.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MCNullStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MCObjectFileInfo.cpp [AsmPrinter] Omit unique ID for .stack_sizes 2020-02-14 21:25:06 -08:00
MCObjectStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MCObjectWriter.cpp
MCRegisterInfo.cpp
MCSchedule.cpp
MCSection.cpp
MCSectionCOFF.cpp
MCSectionELF.cpp [MC][ELF] Rename MC related "Associated" to "LinkedToSym" 2020-02-06 11:31:04 -08:00
MCSectionMachO.cpp
MCSectionWasm.cpp
MCSectionXCOFF.cpp
MCStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MCSubtargetInfo.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
MCSymbol.cpp
MCSymbolELF.cpp
MCTargetOptions.cpp [ms] [llvm-ml] Add a draft MASM parser 2020-02-16 12:30:46 -05:00
MCValue.cpp
MCWasmObjectTargetWriter.cpp
MCWasmStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MCWin64EH.cpp [MCStreamer] De-capitalize EmitValue EmitIntValue{,InHex} 2020-02-14 23:08:40 -08:00
MCWinCOFFStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MCWinEH.cpp
MCXCOFFObjectTargetWriter.cpp
MCXCOFFStreamer.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
StringTableBuilder.cpp
SubtargetFeature.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
WasmObjectWriter.cpp
WinCOFFObjectWriter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
XCOFFObjectWriter.cpp [XCOFF][AIX] Put undefined symbol name into StringTable when neccessary 2020-02-21 18:18:31 +00:00