1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +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 [Disassembler] Delete the VStream parameter of MCDisassembler::getInstruction() 2020-01-11 13:34:52 -08:00
MCParser [MC][ELF] Error for sh_type, sh_flags or sh_entsize change 2020-02-21 15:44:14 -08:00
CMakeLists.txt [MC] Delete MCCodePadder 2019-12-09 19:21:31 -08:00
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 [MC] Delete MCCodePadder 2019-12-09 19:21:31 -08:00
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 [MC] Delete unused MCAsmInfoELF::UsesNonexecutableStackSection after EM_WEBASSEMBLY was removed in D48744 2019-12-15 15:43:30 -08:00
MCAsmInfoWasm.cpp
MCAsmInfoXCOFF.cpp [XCOFF][AIX] Differentiate usage of label symbol and csect symbol 2019-11-08 09:30:10 -05:00
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 [MC] Reorder MCFragment members to decrease padding 2020-01-05 19:09:40 -08:00
MCInst.cpp
MCInstPrinter.cpp [MC] Rewrite tablegen for printInstrAlias to comiple faster, NFC 2019-12-06 15:00:18 -08:00
MCInstrAnalysis.cpp Revert "Forward declare Optional<T> in STLExtras.h" 2019-11-13 16:36:21 -08:00
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 MCRegisterInfo: Merge getLLVMRegNum and getLLVMRegNumFromEH 2019-09-24 09:31:02 +00:00
MCSchedule.cpp
MCSection.cpp [MC][ARM] Delete MCSection::HasData and move SHF_ARM_PURECODE logic to ARMELFObjectWriter::addTargetSectionFlags 2020-01-05 14:20:34 -08:00
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 [AIX] Emit TOC entries for ASM printing 2019-11-27 17:20:55 -05:00
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 [MC] Delete STT_SECTION special cases from MCSymbolELF::setType and setBinding 2019-12-15 20:39:25 -08:00
MCTargetOptions.cpp [ms] [llvm-ml] Add a draft MASM parser 2020-02-16 12:30:46 -05:00
MCValue.cpp [MC] Ignore VK_WEAKREF in MCValue::getAccessVariant 2019-12-15 16:05:46 -08:00
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 [WebAssembly] Add new export_name clang attribute for controlling wasm export names 2019-12-11 11:54:57 -08:00
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