Move ThumbFunc flag from section to symbol.
Make .w forms optional the other way around. If .w is explicitly put on an instruction the assembler should always chose a wide form.
git-svn-id: branches/laksen/armiw@29341 -
Switched codegeneration of VFPv2 and VFPv3 to use UAL mnemonics and syntax.
Updated VFP code in RTL to use UAL syntax too.
Added preliminary ELF support for ARM.
Added support for linking of WinCE COFF files. Should work for with a standard ARMv4-I target.
git-svn-id: branches/laksen/armiw@29247 -
the value set by -Ch or the second parameter to the $M directive). This is
equivalent to the heapmin value in Turbo Pascal 7 and ensures that the program
has at least this amount of heap space available (otherwise DOS will show a
'not enough memory' error and will refuse to load the program).
git-svn-id: trunk@28002 -
itself (instead of having a fixed 16k stack in the startup code). This allows
setting the stack size in these models with the -Cs option.
git-svn-id: trunk@27820 -
* Change MIPS jump tables in PIC mode to use gp-relative constants, making them ABI-compliant and not requiring dynamic relocations.
git-svn-id: trunk@26886 -
* For common symbols, report objdata of the original ObjSymbol, not of the resolving one, so the map file shows where it comes from.
+ TElfExeOutput.OrderOrphanSections method, handles object sections not mentioned in script similar to ld.
- t_linux.pas: removed sections that are not part of ld scripts, they are now handled by OrderOrphanSections.
git-svn-id: trunk@25184 -
* Netware target may be broken by this change; at least it deserves a good cleanup because it contains a lot of code trying to solve similar task: to write exesections without alignment and deal with objsections that are nevertheless being aligned by TExeOutput.
git-svn-id: trunk@23291 -
* Added symstate_undefweak for undefined symbols having only weak references to them, this state is removed when a normal reference to symbol is seen.
* Use a separate boolean property to determine if ExeSymbol is referenced.
* Use a separate property TExeOutput.AllowUndefinedSymbols to suppress error messages when linking dynamic shared objects.
* Don't issue InternalError when an undefined symbol is encountered during unused section removal.
git-svn-id: trunk@23127 -
* Dropped TObjInput.newObjData method. Instead, TObjData instances are created directly in ReadObjData, this gives possibility to create a different type of TObjData based on file header.
- Dropped TObjInput destructor, it does nothing except calling inherited.
git-svn-id: trunk@23118 -
* Write relocation format dependent dynamic tags based on actual sh_type of dynamic relocation sections, instead of global relocs_use_addend flag.
* Don't write DT_REL[A]COUNT tag if .rel[a].dyn section is not present.
git-svn-id: trunk@23083 -
* For Win32 and Win64 targets made sec_rodata read-only, too (for these targets it doesn't matter if read-only section contains relocations).
git-svn-id: trunk@23025 -
* ELF linker: don't make unresolved weak symbols dynamic if linking statically (-Xt in command line).
* Now internal linker produces working executable for tw14265 also on i386-linux when compiling manually (still unable to locate required libraries when run from test suite).
git-svn-id: trunk@22987 -
- Removed separate ELF section names for PIC. The only difference was .data named .data.rel; however .rel suffix has nothing to do with PIC. It only signifies that the section has relocations so such sections can be grouped together in output file and reduce number of pages for dynamic linker to visit while resolving the relocations at load time. At the same time, no existing link scripts distinguish between .rel and any other suffix (except .rel.ro, but it's a different story), meaning that long section names will break .rel grouping.
While support for .data.rel can be added similar to existing rodata handling (separate sec_data and sec_data_norel sections), this doesn't seem worth the trouble.
git-svn-id: trunk@22915 -
* TExeOutput.WriteExeSectionContent: To write proper gap between exe sections, don't align writer position. The desired position is present in exesection.DataPos, so pad right up to it.
git-svn-id: trunk@22881 -
Therefore, added dedicated routines align_aword and align_qword that handle target platform size and 64-bit unsigned, respectively.
+ Also added TExeOutput.FixedSectionAlign boolean that, when set to False, ignores SectionDataAlign and SectionMemAlign and aligns every exe section to its own SecAlign value. This kind of alignment is used on ELF targets.
git-svn-id: trunk@22858 -
x86_64 is the most elaborated, has some degree of indirect function (GNU_IFUNC) and TLS support, so it is even able to link with static libc/pthreads code (tw14265) and produce an executable that can launch (but still fails due to invalid DWARF unwind info).
i386 produces working shared libraries if they are compiled with -Cg, without one your mileage may vary. tw14265 does not link yet due to missing COMDAT group support.
git-svn-id: trunk@22775 -
* TExeOutput.FixupSymbols:
+ Collect AT_GNU_IFUNC symbols in IndirectObjSymbols list for further processing by ELF back-end.
* Do not overwrite bind and size while fixing AB_COMMON symbols, this removes need in storing symbol size in every relocation and dedicated handling of oso_common section.
* Remove symbols with objsection<>nil from lists, so calling FixupSymbols several times skips already processed symbols.
git-svn-id: trunk@22393 -
+ Added TObjSection.WriteBytes method that writes just a string (without zero byte).
* ogelf.pas: Fixed st_value of COMMON symbols, it must contain required symbol alignment.
+ ogelf.pas: Some more definitions.
git-svn-id: trunk@22332 -
+ Allow unresolved external symbols in RemoveUnreferencedSections, such symbols are marked as 'dynamic' if referenced. This approach allows to collect unused sections early and generate import structures only for actually used symbols.
git-svn-id: trunk@22312 -
+ Support linker input source grouping functionality.
* Promote TStaticLibrary to something like generic linker input statement, it can now hold regular ObjData or a group of other TStaticLibrary objects in addition to tarobjectreader.
git-svn-id: trunk@22155 -
* Optimized COFF importing code using the new method.
- Don't create .text sections for imported variables.
- Don't create .idata$6 sections for imports by ordinal.
git-svn-id: trunk@22086 -
+ Two stubs (TExeOutput.Load_DynamicObject and TObjInput.CanReadObjData) to override in ELF linker.
+ Stop linking if errors were detected while loading object files.
* Changed TStaticLibrary to TObject. It is never looked up by name, so hashing is redundant; moreover its name has been changed to TCmdStr, which may be trimmed by TFPHashList.
git-svn-id: trunk@21968 -