| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
When generating a relocatable file, its only valid to set this flag if
all of the inputs also had the flag. Otherwise we may atomize incorrectly
when we link the relocatable file again.
Reviewed by Lang Hames.
Differential Revision: http://reviews.llvm.org/D16018
llvm-svn: 257976
|
|
|
|
|
|
|
|
| |
The image info struct contains flags for what kind of GC/retain/release is required.
Give an error if we parse GC flags as these are unsupported.
llvm-svn: 257974
|
|
|
|
|
|
|
| |
Swift versions are part of the objc image info section, and must match
for all files linked which actually have an image info section
llvm-svn: 257964
|
|
|
|
| |
llvm-svn: 257953
|
|
|
|
| |
llvm-svn: 257841
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes use of the handleLoadedFile hook added in r257814.
That method is used to check the arch and the OS of the files we are linking
against the arch and OS on the context.
The first test to use this ensures that we do not try to combine i386 Mac OS code
with i386 simulator code.
llvm-svn: 257837
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to enable isa<> support for any files which need it.
It will be used in an upcoming patch to differentiate MachOFile from other implicitly generated files.
Reviewed by Lang Hames.
Differential Revision: http://reviews.llvm.org/D16103
llvm-svn: 257830
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is called from the resolver on each file we decide we actually want to use.
Future commits will make use of this to extract useful information from the files and do
error checking against the context. For example, ensure that files are the same arch as
each other.
Reviewed by Lang Hames.
Differential Revision: http://reviews.llvm.org/D16093
llvm-svn: 257814
|
|
|
|
| |
llvm-svn: 257801
|
|
|
|
|
|
| |
longer emit it.
llvm-svn: 257100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __eh_frame section contains relocations which can always be implicitly generated.
This patch tracks whether sections have only implicitly relocations and skips emitting them to the object file if that is the case.
The test case here ensures that this is the case for __eh_frame sections.
Reviewed by Lang Hames.
http://reviews.llvm.org/D15594
llvm-svn: 257099
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a UI such as XCode, LLVM source files are in 'libraries' while clang
files are in 'clang libraries'.
This change moves the lld source to 'lld libraries' to make code browsing easier.
It should be NFC as the build itself is still the same, just the structure in a
UI differs.
llvm-svn: 257001
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fixup content we encode here should be the offset from the
fixup location back to the last nonlocal label. We were only encoding
the address of the fixup, and not taking in to account the base address
of the atom we are in.
Updated the test case here to have a text section which will come before
the data section where the relocation lives. .data being at offset 0 had
previously been hiding this bug.
llvm-svn: 256974
|
|
|
|
| |
llvm-svn: 256805
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The final section order in relocatable files was just a side effect
of the atom sorter. This meant that sections like __data were before
__text because __data has RW permissions and __text RX and RW was less
than RX in our enum.
Final linked images had an actual section/segment sorter. There was no
reason for the difference, so simplify a bunch of code and just use the
same sorted for everything.
Reviewed by Lang Hames.
http://reviews.llvm.org/D15868
llvm-svn: 256786
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The encoded value should be an offset from the fixup location, which
means that it should take in to account the fixup offset in its section.
We weren't subtracting the base address of the atom, which meant that when
we parsed the file again for a round trip, we had 2x the atom address in our
target address.
I've also improved comments for these to try and describe what is going on.
There's no test case right now, as the bug is only exhibited when __data is at
a non-zero address in a -r link. A commit will soon sort the sections differently
and move __data to after __text. Then these relocations in
test/mach-o/parse-data-relocs-x86_64.yaml will test for this bug.
llvm-svn: 256779
|
|
|
|
|
|
|
|
|
|
|
| |
negDelta32 is only ever implicitly generated as the FDE->CIE reference.
We therefore don't emit a relocation for it in the object file in -r mode.
The value we write in to the FDE location therefore needs to point to the
final target address of the CIE, and not the inAtomAddress as it was currently
doing.
llvm-svn: 255835
|
|
|
|
|
|
|
| |
In debug builds there's now a dump method on Section and improved
printing of atoms.
llvm-svn: 255826
|
|
|
|
|
|
|
|
|
|
|
|
| |
doing. NFC.
We had some DEBUG prints these passes, but add more so that its clear where we are dumping
things, and what state we are in when we do so.
I'll be adding more and more DEBUG printing to try make it easier to observe whats going on
without having to attach a debugger.
llvm-svn: 255805
|
|
|
|
|
|
|
|
|
| |
appropriate bits.
This fixes the remaining clang regression test failures when linking clang with
lld on Darwin.
llvm-svn: 255390
|
|
|
|
|
|
|
|
|
|
| |
The delta64 relocation is represented as the pair ARM64_RELOC_SUBTRACTOR and ARM64_RELOC_UNSIGNED.
Those should always have the same offset, so this adds a check and tests to ensure this is the case.
Also updated the error printing in this case to shows both relocs when erroring on pair.
llvm-svn: 255274
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
table.
The first entry in the MachO symbol table is always the empty string: make sure
we reserve space for it, or we will overflow the symbol table by one byte.
No test case - this manifests as an occasional memory error. In the near future
I hope to set up a bot building and runnnig LLD with sanitizers - that should
catch future instances of this issue.
llvm-svn: 255178
|
|
|
|
|
|
|
|
|
|
|
| |
The gcc_except_tab was generating these references to point to the typeinfo in the data section.
gcc_except_tab also had the DW_EH_PE_indirect flag set which means that at runtime we are going
to dereference this entry as if it is in the GOT.
Reviewed by Nick Kledzik in http://reviews.llvm.org/D15360.
llvm-svn: 255085
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D14553
llvm-svn: 252661
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D14310
llvm-svn: 252034
|
|
|
|
| |
llvm-svn: 251637
|
|
|
|
|
|
|
|
|
| |
MachODefinedCustomSectionAtom.
The section names for these atoms are initialized from temporaries (e.g.
segName + "/" + sectName), so we can't use StringRef here.
llvm-svn: 251610
|
|
|
|
| |
llvm-svn: 251183
|
|
|
|
| |
llvm-svn: 251095
|
|
|
|
| |
llvm-svn: 250863
|
|
|
|
| |
llvm-svn: 250861
|
|
|
|
|
|
| |
Patch from Eugene Zelenko!
llvm-svn: 249111
|
|
|
|
| |
llvm-svn: 248736
|
|
|
|
|
|
|
|
|
| |
This is a basic initial implementation of the -flat_namespace and
-undefined options for LLD-darwin. It ignores several subtlties,
but the result is close enough that we can now link LLVM (but not
clang) on Darwin and pass all regression tests.
llvm-svn: 248732
|
|
|
|
|
|
| |
export trie.
llvm-svn: 248217
|
|
|
|
|
|
| |
Patch from Eugene Zelenko!
llvm-svn: 247323
|
|
|
|
| |
llvm-svn: 244849
|
|
|
|
|
|
| |
way of the default ops (copy construction, assignment, etc)
llvm-svn: 244836
|
|
|
|
|
|
|
|
| |
This allows LLD to correctly link MachO objects that use thread-local storage.
Differential Revision: http://reviews.llvm.org/D10578
llvm-svn: 240454
|
|
|
|
|
|
|
|
|
| |
The ObjectFileYAML.roundTrip serializes a default-constructed
NormalizedFile to YAML, triggering uninitialized memory reads.
While there use in-class member initializers.
llvm-svn: 240446
|
|
|
|
|
|
|
|
| |
None of the implementations replace the SimpleFile with some other file,
they just modify the SimpleFile in-place, so a direct reference to the
file is sufficient.
llvm-svn: 240167
|
|
|
|
| |
llvm-svn: 240147
|
|
|
|
|
|
| |
Addresses some review comments for r237841.
llvm-svn: 237979
|
|
|
|
| |
llvm-svn: 237841
|
|
|
|
|
|
| |
CIE, not just the most recently encountered one.
llvm-svn: 237491
|
|
|
|
|
|
|
| |
Previously the LSDA field was not being relocated during linking, leading to
failures for some EH tests.
llvm-svn: 237222
|
|
|
|
| |
llvm-svn: 237219
|
|
|
|
|
|
| |
MachOLinkingContext.
llvm-svn: 237217
|
|
|
|
|
|
| |
This just reduces the noise from another patch.
llvm-svn: 235933
|
|
|
|
|
|
| |
This just reduces the noise from another patch.
llvm-svn: 235776
|