Description: unit ogbase unmerged

This file as text.
(active) Revisions in this set:
4357caaad882705021c49bab78882f65fe52a612,281b3ad276d8b66085fde25139123a574ef06afd,ee1be45df9e25993bc8c8289e7b8bd814064197a
3fee990218b4648ab020d85f783959b1d8fb0dd4,3ebcef32ba62ad3f66c33e983b6c6b62b516bb31,14b7eaa46f2d80ec8db5efbd5fb71d4469002504
56d91b4ca79540828c8af3950d6187cc210d17a2,03dfc615dc450f38fae15cd06188dcd56b877616,16163b74ec9daf00f87075afea385e54f9813e5b
8ecdb2e9ca9b32f1334f237612411e7e17e5d1e6,245b58c249b4b29ffc54e6c1e50a1474cc84f7b1,e5de269664c7029770bb2e4092cd28a9a31545cf
7f8800eeb15ef2db9dbe43b91db194b0e0d0e53f,137f392c66a298d58a03c3ca336470e5a5274efa,99ce957111b021c5739d96df65ebb11fb274e71e
2a1d26cc905b54f2880fb3f2c51c32a300f32bbe,5b941e3cea65f1bc58bc2189d6eb371b3c3441d4,61358b1eaad0f8b5e605d58983b43c1864a38da0
4fed57adc13e75bc70c1495273cf9caa295c0d07,997184778a01718472c29a67e70ceadb32194e47,616cb382922c96086cdf5f9298f690af5d003429
e8af7427bb0ead629eea25ac86556605b1dea252,9c54d753f56bab86b9b451c8f4415cd041357a36,47ba80a54525b5ef8662f28282e4ccd73fc7d698
985220d94c6092336c956ed5dea464eb80c6c0ce,17d583a419b65457783dc7b816297b69309157f0

Clicking a revision will expand files
 


* Removed unused local vars.
Commit consists out of
  • M compiler/aarch64/aasmcpu.pas
  • M compiler/aarch64/aoptcpu.pas
  • M compiler/aarch64/cgcpu.pas
  • M compiler/aarch64/ncpucnv.pas
  • M compiler/aarch64/ncpuinl.pas
  • M compiler/aarch64/racpugas.pas
  • M compiler/aasmcnst.pas
  • M compiler/i386/aoptcpu.pas
  • M compiler/nadd.pas
  • M compiler/ncgrtti.pas
  • M compiler/ninl.pas
  • M compiler/ogbase.pas
  • M compiler/options.pas
  • M compiler/pdecsub.pas
  • M compiler/psub.pas
  • M compiler/rgobj.pas
  • M compiler/symdef.pas
  • M compiler/x86/aasmcpu.pas
  • M compiler/x86/agx86int.pas
  • M compiler/x86/aoptx86.pas
  • M compiler/x86/nx86inl.pas
  • M compiler/x86/nx86mat.pas
  • M compiler/x86/nx86set.pas
  • M compiler/x86_64/cpupara.pas


* fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit
Commit consists out of
  • M compiler/aarch64/agcpugas.pas
  • M compiler/aarch64/aoptcpu.pas
  • M compiler/aarch64/aoptcpub.pas
  • M compiler/aarch64/cgcpu.pas
  • M compiler/aarch64/cpupara.pas
  • M compiler/aarch64/racpu.pas
  • M compiler/aarch64/racpugas.pas
  • M compiler/aarch64/rgcpu.pas
  • M compiler/aasmsym.pas
  • M compiler/aasmtai.pas
  • M compiler/aggas.pas
  • M compiler/aopt.pas
  • M compiler/aoptobj.pas
  • M compiler/arm/aasmcpu.pas
  • M compiler/arm/agarmgas.pas
  • M compiler/arm/aoptcpu.pas
  • M compiler/arm/aoptcpub.pas
  • M compiler/arm/cgcpu.pas
  • M compiler/arm/cpubase.pas
  • M compiler/arm/cpuelf.pas
  • M compiler/arm/cpupara.pas
  • M compiler/arm/cpupi.pas
  • M compiler/arm/narmadd.pas
  • M compiler/arm/narmcnv.pas
  • M compiler/arm/raarmgas.pas
  • M compiler/arm/rgcpu.pas
  • M compiler/assemble.pas
  • M compiler/cfidwarf.pas
  • M compiler/cgobj.pas
  • M compiler/dbgbase.pas
  • M compiler/dbgcodeview.pas
  • M compiler/dbgdwarf.pas
  • M compiler/dbgstabs.pas
  • M compiler/dbgstabx.pas
  • M compiler/defcmp.pas
  • M compiler/defutil.pas
  • M compiler/fppu.pas
  • M compiler/gendef.pas
  • M compiler/hlcg2ll.pas
  • M compiler/hlcgobj.pas
  • M compiler/htypechk.pas
  • M compiler/i386/aoptcpu.pas
  • M compiler/i386/cgcpu.pas
  • M compiler/i386/cpuelf.pas
  • M compiler/i386/cpupara.pas
  • M compiler/i386/n386add.pas
  • M compiler/i8086/aoptcpu.pas
  • M compiler/i8086/cgcpu.pas
  • M compiler/i8086/cpupara.pas
  • M compiler/i8086/n8086add.pas
  • M compiler/i8086/symcpu.pas
  • M compiler/jvm/agjasmin.pas
  • M compiler/jvm/aoptcpu.pas
  • M compiler/jvm/cpupara.pas
  • M compiler/jvm/dbgjasm.pas
  • M compiler/jvm/hlcgcpu.pas
  • M compiler/jvm/jvmdef.pas
  • M compiler/jvm/njvmcnv.pas
  • M compiler/jvm/njvmcon.pas
  • M compiler/jvm/njvminl.pas
  • M compiler/jvm/rgcpu.pas
  • M compiler/jvm/tgcpu.pas
  • M compiler/llvm/aasmllvm.pas
  • M compiler/llvm/agllvm.pas
  • M compiler/llvm/hlcgllvm.pas
  • M compiler/llvm/llvmdef.pas
  • M compiler/llvm/llvmtype.pas
  • M compiler/llvm/nllvmbas.pas
  • M compiler/llvm/nllvmld.pas
  • M compiler/llvm/nllvmtcon.pas
  • M compiler/llvm/rgllvm.pas
  • M compiler/mips/aasmcpu.pas
  • M compiler/mips/aoptcpu.pas
  • M compiler/mips/cgcpu.pas
  • M compiler/mips/cpubase.pas
  • M compiler/mips/cpuelf.pas
  • M compiler/mips/cpupara.pas
  • M compiler/mips/hlcgcpu.pas
  • M compiler/mips/itcpugas.pas
  • M compiler/mips/ncpuadd.pas
  • M compiler/mips/ncpuld.pas
  • M compiler/nadd.pas
  • M compiler/nbas.pas
  • M compiler/ncal.pas
  • M compiler/ncgbas.pas
  • M compiler/ncgcal.pas
  • M compiler/ncgcnv.pas
  • M compiler/ncgcon.pas
  • M compiler/ncgld.pas
  • M compiler/ncgmem.pas
  • M compiler/ncgnstld.pas
  • M compiler/ncgrtti.pas
  • M compiler/ncgset.pas
  • M compiler/ncgutil.pas
  • M compiler/ncgvmt.pas
  • M compiler/ncnv.pas
  • M compiler/ncon.pas
  • M compiler/ngenutil.pas
  • M compiler/ngtcon.pas
  • M compiler/ninl.pas
  • M compiler/nmat.pas
  • M compiler/nmem.pas
  • M compiler/nopt.pas
  • M compiler/nset.pas
  • M compiler/nutils.pas
  • M compiler/ogbase.pas
  • M compiler/ogcoff.pas
  • M compiler/ogelf.pas
  • M compiler/ogmacho.pas
  • M compiler/ogomf.pas
  • M compiler/omfbase.pas
  • M compiler/optdfa.pas
  • M compiler/options.pas
  • M compiler/optloop.pas
  • M compiler/opttail.pas
  • M compiler/optutils.pas
  • M compiler/optvirt.pas
  • M compiler/parabase.pas
  • M compiler/paramgr.pas
  • M compiler/parser.pas
  • M compiler/pbase.pas
  • M compiler/pdecl.pas
  • M compiler/pdecobj.pas
  • M compiler/pdecsub.pas
  • M compiler/pdecvar.pas
  • M compiler/pexports.pas
  • M compiler/pexpr.pas
  • M compiler/pgenutil.pas
  • M compiler/pkgutil.pas
  • M compiler/powerpc/agppcmpw.pas
  • M compiler/powerpc/aoptcpu.pas
  • M compiler/powerpc/cgcpu.pas
  • M compiler/powerpc/cpubase.pas
  • M compiler/powerpc/cpupara.pas
  • M compiler/powerpc/nppcadd.pas
  • M compiler/powerpc/nppcmat.pas
  • M compiler/powerpc/rappcgas.pas
  • M compiler/powerpc64/cgcpu.pas
  • M compiler/powerpc64/cpubase.pas
  • M compiler/powerpc64/cpupara.pas
  • M compiler/powerpc64/nppcadd.pas
  • M compiler/powerpc64/rappcgas.pas
  • M compiler/pparautl.pas
  • M compiler/ppcgen/aasmcpu.pas
  • M compiler/ppcgen/agppcgas.pas
  • M compiler/ppcgen/cgppc.pas
  • M compiler/ppcgen/ngppcadd.pas
  • M compiler/psub.pas
  • M compiler/ptype.pas
  • M compiler/rautils.pas
  • M compiler/rgobj.pas
  • M compiler/riscv/aasmcpu.pas
  • M compiler/riscv/agrvgas.pas
  • M compiler/riscv32/aoptcpu.pas
  • M compiler/riscv32/cpubase.pas
  • M compiler/riscv32/cpupara.pas
  • M compiler/riscv32/cpupi.pas
  • M compiler/riscv32/nrv32cnv.pas
  • M compiler/riscv32/rarv32gas.pas
  • M compiler/riscv64/aoptcpu.pas
  • M compiler/riscv64/cgcpu.pas
  • M compiler/riscv64/cpubase.pas
  • M compiler/riscv64/cpupara.pas
  • M compiler/riscv64/cpupi.pas
  • M compiler/riscv64/rarv64gas.pas
  • M compiler/scanner.pas
  • M compiler/sparc/cgcpu.pas
  • M compiler/sparc/cpupara.pas
  • M compiler/sparc64/cpugas.pas
  • M compiler/sparc64/cpupara.pas
  • M compiler/sparcgen/aoptcpu.pas
  • M compiler/sparcgen/cgsparc.pas
  • M compiler/sparcgen/cpugas.pas
  • M compiler/sparcgen/itcpugas.pas
  • M compiler/sparcgen/rgcpu.pas
  • M compiler/symcreat.pas
  • M compiler/symdef.pas
  • M compiler/symsym.pas
  • M compiler/symtable.pas
  • M compiler/symtype.pas
  • M compiler/symutil.pas
  • M compiler/systems/t_amiga.pas
  • M compiler/systems/t_bsd.pas
  • M compiler/systems/t_embed.pas
  • M compiler/systems/t_macos.pas
  • M compiler/systems/t_nds.pas
  • M compiler/systems/t_win.pas
  • M compiler/x86/aasmcpu.pas
  • M compiler/x86/agx86att.pas
  • M compiler/x86/agx86int.pas
  • M compiler/x86/aoptx86.pas
  • M compiler/x86/cgx86.pas
  • M compiler/x86/cpubase.pas
  • M compiler/x86/nx86add.pas
  • M compiler/x86/nx86cnv.pas
  • M compiler/x86/nx86ld.pas
  • M compiler/x86/nx86mat.pas
  • M compiler/x86/nx86mem.pas
  • M compiler/x86/rax86.pas
  • M compiler/x86/rax86att.pas
  • M compiler/x86/rax86int.pas
  • M compiler/x86/rgx86.pas
  • M compiler/x86/symx86.pas
  • M compiler/x86_64/aoptcpu.pas
  • M compiler/x86_64/cpuelf.pas
  • M compiler/x86_64/cpupara.pas
  • M compiler/x86_64/nx64flw.pas
  • M compiler/x86_64/win64unw.pas

Merge: b9c16b98d1 b08b6a17bd

* reintegrated debug_eh branch
o the LLVM compiler is now functional for Darwin/x86-64, and also (but less
tested) for Linux/x86-64, Linux/AArch64 and Linux/ARMHF. See
https://wiki.freepascal.org/LLVM for details and the current state
o Dwarf-eh-based "zero-cost" exceptions are available with the regular
code generators for Linux/x86-64 and Linux/i386 if the compiler is
compiled with -dpsabieh


* on Mach-O, PECOFF and ELF platforms, write local symbols as hidden/
private_extern (or plain global in case of PECOFF, as the effect is
the same there): visible across object files, but they become local
when linked into a binary/library. This enables cross-unit inlining
of functions accessig implementation-only symbols.
Commit consists out of
  • M compiler/aarch64/hlcgcpu.pas
  • M compiler/aasmbase.pas
  • M compiler/aasmtai.pas
  • M compiler/aggas.pas
  • M compiler/arm/hlcgcpu.pas
  • M compiler/elfbase.pas
  • M compiler/hlcgobj.pas
  • M compiler/i386/hlcgcpu.pas
  • M compiler/i8086/hlcgcpu.pas
  • M compiler/llvm/nllvmutil.pas
  • M compiler/m68k/hlcgcpu.pas
  • M compiler/mips/hlcgcpu.pas
  • M compiler/ncal.pas
  • M compiler/ncgutil.pas
  • M compiler/ngenutil.pas
  • M compiler/ngtcon.pas
  • M compiler/ogbase.pas
  • M compiler/ogcoff.pas
  • M compiler/ogelf.pas
  • M compiler/ppcgen/hlcgppc.pas
  • M compiler/psub.pas
  • M compiler/riscv/hlcgrv.pas
  • M compiler/sparcgen/hlcgcpu.pas
  • M compiler/systems.pas
  • M compiler/systems/i_android.pas
  • M compiler/systems/i_aros.pas
  • M compiler/systems/i_bsd.pas
  • M compiler/systems/i_haiku.pas
  • M compiler/systems/i_linux.pas
  • M compiler/systems/i_nativent.pas
  • M compiler/systems/i_sunos.pas
  • M compiler/systems/i_win.pas
  • M compiler/x86/agx86nsm.pas
  • M compiler/x86_64/hlcgcpu.pas


+ introduced TExeSection.MemPosStr - a virtual method for converting the
section's memory position to string for the linker map file. This can be
overriden e.g. for segmented exe formats.
Commit consists out of
  • M compiler/ogbase.pas
  • M compiler/ogmap.pas


+ x86-64: implemented support for relocation needed by tls threadvars in the binary elf writer
Commit consists out of
  • M compiler/ogbase.pas
  • M compiler/ogelf.pas
  • M compiler/x86/aasmcpu.pas
  • M compiler/x86_64/cpuelf.pas


+ support tls threadvars with the internal assembler
Commit consists out of
  • M compiler/i386/cpuelf.pas
  • M compiler/ogbase.pas
  • M compiler/ogelf.pas
  • M compiler/x86/aasmcpu.pas
  • M rtl/linux/i386/si_prc.inc


+ new relocations for arm tls
Commit consists out of
  • M compiler/aasmtai.pas
  • M compiler/aggas.pas
  • M compiler/arm/aasmcpu.pas
  • M compiler/arm/cgcpu.pas
  • M compiler/assemble.pas
  • M compiler/cgbase.pas
  • M compiler/ogbase.pas


+ support for the gnu2 general-dynamic tls model on arm, use it instead of the gnu one as the gnu2 one can be relaxed (access optimizations by the linker)
+ support pic relocations in the internal assembler writer
Commit consists out of
  • M compiler/aasmtai.pas
  • M compiler/aggas.pas
  • M compiler/arm/aasmcpu.pas
  • M compiler/arm/agarmgas.pas
  • M compiler/arm/cgcpu.pas
  • M compiler/arm/cpuelf.pas
  • M compiler/arm/narmld.pas
  • M compiler/assemble.pas
  • M compiler/cgbase.pas
  • M compiler/ogbase.pas


+ dwarf support for tls threadvars
Commit consists out of
  • M compiler/aasmtai.pas
  • M compiler/aggas.pas
  • M compiler/arm/cpuelf.pas
  • M compiler/assemble.pas
  • M compiler/dbgdwarf.pas
  • M compiler/i386/cpuelf.pas
  • M compiler/ogbase.pas
  • M compiler/x86_64/cpuelf.pas


+ support for arm attributes
* abi notes fixed
Commit consists out of
  • M .gitattributes
  • M compiler/aasmbase.pas
  • M compiler/aasmtai.pas
  • M compiler/aggas.pas
  • M compiler/arm/cpuinfo.pas
  • M compiler/arm/cpunode.pas
  • A compiler/arm/narmutil.pas
  • M compiler/assemble.pas
  • M compiler/elfbase.pas
  • M compiler/ogbase.pas
  • M compiler/ogcoff.pas
  • M compiler/ogelf.pas
  • M compiler/psabiehpi.pas
  • M compiler/raatt.pas
  • M rtl/linux/arm/abitag.inc


* change TObjData.sectiontype2options to a class function so that it can be called without an instance of TObjData
Commit consists out of
  • M compiler/ogbase.pas
  • M compiler/ogcoff.pas
  • M compiler/ogmacho.pas
  • M compiler/ogomf.pas


+ add a method to TObjData to retrieve the TSectionProcBits and TSectionFlags values for a given section type
Commit consists out of
  • M compiler/ogbase.pas


* parameters declared as out must be initialized
Commit consists out of
  • M compiler/ogbase.pas


* fixed default value for progbits
Commit consists out of
  • M compiler/ogbase.pas


* use translateable error messages for undefined symbols and also report in which object file the symbol was first found
Commit consists out of
  • M compiler/ogbase.pas


+ implement relocations for Aarch64 for the internal COFF linker
Commit consists out of
  • M compiler/ogbase.pas
  • M compiler/ogcoff.pas


* it's rather useless that sectiontype2options is virtual as we can't use a class type, not to mention that the classes doing the overriding are for the internal assemblers/linkers, but we need it also for external
Thus we move the functionality of the overloads to the basemethod and remove the virtual directive; maybe we'll find a better solution in the future...
Commit consists out of
  • M compiler/ogbase.pas
  • M compiler/ogcoff.pas
  • M compiler/ogomf.pas


+ lots of fixes to the Z80 internal asm writer
Commit consists out of
  • M compiler/ogbase.pas
  • M compiler/ogrel.pas
  • M compiler/z80/aasmcpu.pas


+ call ApplyAsmSymbolRestrictions for symbols that should be exported from ar files
Commit consists out of
  • M compiler/ogbase.pas


* fixed the TRelocDataInt to avoid truncating 16-bit addresses to 8-bit on 8-bit CPUs
Commit consists out of
  • M compiler/ogbase.pas


* the len parameter of TObjData.alloc changed to TObjSectionOfs
Commit consists out of
  • M compiler/ogbase.pas


* ImageBase changed to qword (same type as CurrMemPos) to avoid truncating to 8-bit on Z80
Commit consists out of
  • M compiler/ogbase.pas


* the len parameter of TObjData.writebytes changed to TObjSectionOfs to avoid 8-bit truncation on Z80
Commit consists out of
  • M compiler/ogbase.pas


* Added virtual function TObjSection.GetAltName to be able to specify additional section name by descendants.
* OMF: Use the name of the first global symbol as an addition section name. This name is visible in the linker map file and helps tracking of section references.
Commit consists out of
  • M compiler/ogbase.pas
  • M compiler/ogomf.pas


* fix for Mantis 0037559: the adjustment of the section type should only be done for internal COFF writers
Commit consists out of
  • M compiler/ogbase.pas

(inactive) Revisions in this set ccb169b0f1b3214c6b09b3bd89492e2ce0626fa1


* correctly handle PE COMDAT sections: like for the Comdat groups in ELF files the unused symbols need to be converted to externals so that relocations are handled correctly
Commit consists out of
  • M compiler/ogbase.pas

possibily resolvable by 0042340 or patch manually.