summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
Commit message (Collapse)AuthorAgeFilesLines
...
* Run clang-format.Rui Ueyama2013-09-111-602/+488
| | | | llvm-svn: 190554
* Support darwin linker options: Nick Kledzik2013-09-101-1/+25
| | | | | | | | -current_version, -compatibility_version, and -install_name. Patch by Joe Ranieri llvm-svn: 190452
* Remove PackedVersion from MachOLinkingContext and replace with uint32_tNick Kledzik2013-09-101-35/+20
| | | | | | | | and a parsePackedVersion() utility. Patch by Joe Ranieri llvm-svn: 190451
* Handle _DYNAMIC correctly in the x86_64 backend.Joerg Sonnenberger2013-09-092-0/+27
| | | | llvm-svn: 190302
* Drop the context forceLoadAllArchives() support. Rename the isForceLoadJoerg Sonnenberger2013-09-081-1/+1
| | | | | | | | | attribute in LinkerInput to isWholeArchive and use that for deciding whether library archives should be expanded. Implement the -all_load option of the Darwin linker using this flag and drop the support for it in GNU mode. llvm-svn: 190275
* Run clang-format.Joerg Sonnenberger2013-09-071-63/+64
| | | | llvm-svn: 190254
* Change the parseFile argument from MemoryBuffer pointer to LinkerInputJoerg Sonnenberger2013-09-0711-62/+61
| | | | | | reference. Move readFile logic into FileNode::createLinkerInput. llvm-svn: 190253
* [PECOFF] Don't add RVAs to base relocations table.Rui Ueyama2013-09-061-5/+10
| | | | | | Patch by Ron Ofir. llvm-svn: 190210
* [PECOFF] Fix section alignment bug in ReaderCOFF.Rui Ueyama2013-09-061-2/+4
| | | | | | Patch by Ron Ofir. llvm-svn: 190198
* [PECOFF] Align section contents as specified by the object file's section ↵Rui Ueyama2013-09-063-1/+24
| | | | | | header. llvm-svn: 190120
* [lld][ELF] Change the order of the writable note sectionShankar Easwaran2013-09-051-1/+1
| | | | | | | Writable note sections if they exist should not appear before text they belong in the data segment llvm-svn: 190024
* [lld][ELF] Differentiate between Note sections(RW/RO)Shankar Easwaran2013-09-044-16/+42
| | | | | | | | | | It looks like there is a possibility of seeing RO/RW note sections and we would need to create an appropriate RO/RW segment associated with them. Adds a test too. llvm-svn: 189907
* [PECOFF] Ignore options starting with -?Rui Ueyama2013-09-041-1/+1
| | | | | | | | | | | The compiler is allowed to add a linker option starting with -?<name> to .drectve section. If the linker can interpret -<name>, it's processed as if there's no question mark there. If not, such option is silently ignored. This is a COFF's feature to allow the compiler to emit new linker options while keeping compatibility with older linkers. llvm-svn: 189897
* [lld][ELF] Emit note sectionsShankar Easwaran2013-09-044-0/+15
| | | | | | | | Emit note sections if the input contains a note section. Also emit a note segment. llvm-svn: 189896
* Start a TODO list for the ELF backend.Joerg Sonnenberger2013-09-041-0/+17
| | | | llvm-svn: 189890
* [PECOFF] Allocate storage for .drective in the reader to avoid multiple ↵Rui Ueyama2013-09-031-5/+6
| | | | | | calls of allocateString() llvm-svn: 189881
* [PECOFF] Verify parameter in validateImpl() not in the driver.Rui Ueyama2013-09-031-0/+7
| | | | llvm-svn: 189877
* [lld] Remove bitfield for boolean membersShankar Easwaran2013-09-031-1/+1
| | | | llvm-svn: 189876
* [lld][ELF][X86_64] Fix alignment of init_array/fini_array sectionsShankar Easwaran2013-09-031-1/+4
| | | | llvm-svn: 189874
* [lld][ELF] Change the InitFini atom type from Stub to DataShankar Easwaran2013-09-031-1/+1
| | | | llvm-svn: 189873
* [lld][ELF][Hexagon] add Init/Fini option for hexagonShankar Easwaran2013-09-032-0/+88
| | | | | | This adds init/fini support for Hexagon. llvm-svn: 189872
* [lld] handle the case of errors from createLinkerInputShankar Easwaran2013-09-031-2/+5
| | | | | | | | | | This changes the interface of createLinkerInput to use ErrorOr, so that errors from the linker can be captured. Also adds a convenience function for error strings to be returned from file nodes. llvm-svn: 189871
* [PECOFF] Fix fixme by making PECOFFLinkingContext non-const.Rui Ueyama2013-09-031-10/+8
| | | | llvm-svn: 189865
* Finish -rpath implementation to actually create the DT_RPATH entries.Joerg Sonnenberger2013-09-031-0/+9
| | | | llvm-svn: 189847
* Add support for --sysroot.Joerg Sonnenberger2013-09-031-3/+14
| | | | llvm-svn: 189826
* A weak reference to a symbol that is only weakly referenced inJoerg Sonnenberger2013-09-031-1/+3
| | | | | | dependencies should remain weak, not get promoted to undef or dropped. llvm-svn: 189793
* ReaderWriter depends on Passes.Joerg Sonnenberger2013-09-021-0/+1
| | | | llvm-svn: 189751
* [lld][ELF] Add Init/Fini supportShankar Easwaran2013-08-313-0/+113
| | | | | | | | This creates .init_array/.fini_array section for X86_64 ELF targets and executes init/fini functions specified by the -init/-fini options respectively. llvm-svn: 189719
* [lld][LinkingContext] Atoms created from command line options should be ↵Shankar Easwaran2013-08-319-145/+130
| | | | | | | | | | | | available in YAML This adds an API to the LinkingContext for flavors to add Internal files containing atoms that need to appear in the YAML output as well, when -emit-yaml switch is used. Flavors can add more internal files for other options that are needed. llvm-svn: 189718
* [PECOFF] Fix bug that section grouping may lay out atoms in a wrong order.Rui Ueyama2013-08-291-1/+31
| | | | | | | | | We added layout edges to the head atoms in grouped sections. That was wrong, because the head atom needs to be followed by the other atoms in the *same* section, not by the other section contents. With this patch, layout edges are added from tail atom, which is the last atom in a section, to head atom. llvm-svn: 189573
* [PECOFF] Fix bug that atom size was sometimes wrong.Rui Ueyama2013-08-291-1/+1
| | | | | | | | Because of a bug, the last atom of each section contained a garbage at the end of its data. In most cases the garbage is harmless but it could have cause SEGV. llvm-svn: 189572
* [PECOFF] Add helper functions for debuggingRui Ueyama2013-08-291-0/+20
| | | | llvm-svn: 189570
* [PECOFF] Do not create undefined atom for common symbol.Rui Ueyama2013-08-281-1/+2
| | | | | | | | We were creating undefined atoms for common symbols by mistake. That did not lead to a link failure, for undefined atoms would be resolved by common symbols in the same file, but that's a waste of resource. llvm-svn: 189534
* [PECOFF] Do not scan the symbol table twice but instead cache aux symbols.Rui Ueyama2013-08-281-14/+19
| | | | | | | | | We scanned the symbol table twice; first to gather all regular symbols, and second to process aux symbols. That's a bit inefficient and complicated. We can instead cache aux symbols in the first pass, to eliminate the need of the second pass. llvm-svn: 189525
* Rename ti -> ctx.Rui Ueyama2013-08-276-22/+23
| | | | | | | This should have been done in r187823 when I renamed LinkingContext from TargetInfo. I missed a few files. llvm-svn: 189298
* [PECOFF] Add Support for entry point symbol nameRui Ueyama2013-08-261-0/+29
| | | | | | Patch by Jesús Serrano García. llvm-svn: 189267
* [lld][ELF] Cleanup ELF writing, No change in functionalityShankar Easwaran2013-08-269-117/+85
| | | | | | | | | | The cleanup includes :- * Rename ambiguous Header class to ELFHeader * Convert Chunk contentype and kind to be a enumerated class * Remove functions that are not being used, avoids future confusion llvm-svn: 189209
* [lld][ELF] process fini_array sectionsShankar Easwaran2013-08-253-1/+6
| | | | | | | | This change processes fini_array section in addition to processing init_array sections. This also makes functions registered at compile time for initialization and finalization to be run during execution llvm-svn: 189196
* Separates /fixed (no .reloc section) and /dynamicbase (enable ASLR)Rui Ueyama2013-08-241-1/+1
| | | | | | | | in order to match link.exe's behaviour. Patch by Ron Ofir. llvm-svn: 189159
* [lld][ELF] Dont ignore zero sized sections.Shankar Easwaran2013-08-231-3/+1
| | | | | | | | There may be relocations that may be pointing to the section even if the section sizes are 0. We shouldnot ignore them for that regard. llvm-svn: 189139
* [lld][ELF][Cleanup] Section associated with the relocation traversedShankar Easwaran2013-08-231-10/+6
| | | | | | | There is no change in functionality, this uses the defined way to access the relocation section that belongs to a particular section. llvm-svn: 189138
* [lld][ELF] Rename typeTLV content type for ELFShankar Easwaran2013-08-234-12/+16
| | | | | | | | | | | typeTLV content type is used by Darwin to represent thread local storage. A new contentType has to be made to represent ELF thread local storage data. These have been set to - typeThreadZeroFill (represents TBSS storage) - typeThreadData (represents TDATA storage) llvm-svn: 189137
* [lld] handle typeZeroFill atoms in ELF/Native/YAMLShankar Easwaran2013-08-236-11/+17
| | | | | | | | | | | | | BSS atoms dont take any file space in the Input file. They are associated with a contentType(typeZeroFill). Similiar zero fill types also exist which have the same meaning in terms of occupying file space in the Input. These atoms have to be handled seperately when writing to the lld's intermediate file or the lld test infrastructure. Also adds a test. llvm-svn: 189136
* [lld][PECOFF] Fix use of temporary stringsShankar Easwaran2013-08-221-2/+1
| | | | llvm-svn: 189025
* [lld][Hexagon] Enable Hexagon sdata sorting testShankar Easwaran2013-08-221-1/+8
| | | | llvm-svn: 188981
* remove trailing whitespaceShankar Easwaran2013-08-222-5/+5
| | | | llvm-svn: 188965
* add InputGraph functionalityShankar Easwaran2013-08-216-695/+19
| | | | llvm-svn: 188958
* [PECOFF] Treat the common symbol as mergeable symbol.Rui Ueyama2013-08-132-9/+23
| | | | | | | This is a temporary measure because the semantics of the common symbol is actually more compilcated than the simple mergeable symbol. llvm-svn: 188235
* [PECOFF] Fixed base images now have the IMAGE_FILE_RELOCS_STRIPPED flagRui Ueyama2013-08-121-0/+3
| | | | | | Patch by Ron Ofir. llvm-svn: 188187
* [PECOFF] Trim at most one character from imported symbols.Rui Ueyama2013-08-121-2/+10
| | | | | | | | | | | | | | The import name is not always the same as the symbol name. If the name/type field in the import header is NOPREFIX or UNDECORATE, we need to strip some characters from symbol to get its import name. The Microsoft PE/COFF spec is vague if symbol contains more than two consecutive characters to be stripped. We used to strip all characters, but it doesn't seem right as we couldn't link against the system library because of this name mangling. Looks like we shouldn't strip more than one character. llvm-svn: 188154
OpenPOWER on IntegriCloud