[Darwin] Fix Reference to nullptr.

On discussing this with Nick, it looks like the StubAtoms
that contain a lazyImmediate reference kind should be null
and the location needs to be fixed up later with some value
that is an offset into the __LINKEDIT segment.

The drawback is that it allows yaml files with references
that expect a target to be considered without one.

This results in bad yaml files that would need to be handled
in the YAML Reader.

Inorder to fix this, the Stub Atoms use a dummy target such
as itself.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193476 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Add dataDirectoryEntry as a recognized ContentType

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193477 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Add COFF relocations to encode/decode to/from YAML files

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193478 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Add atoms to the PassManager file

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193479 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] Add more relocation types.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193480 91177308-0d34-0410-b5e6-96231b3b80d8
[X86_64] Fix the atom that need to be exported.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193481 91177308-0d34-0410-b5e6-96231b3b80d8
[ELF] Fix RO/RW note sections.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193482 91177308-0d34-0410-b5e6-96231b3b80d8
[ELF][test] Remove default section names for known contentTypes.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193483 91177308-0d34-0410-b5e6-96231b3b80d8
Use equals_lower() rather than creating a temporary string with lower().

More important than any performance concerns, the code was dropping the
temporary string on the floor after assigning it to a StringRef, and
then used the StringRef later. Caught by running the LLD tests under
ASan.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193486 91177308-0d34-0410-b5e6-96231b3b80d8
Rather than rendering an argument to a std::string (which is primarily
intended for debugging and diagnostic output), just inspect the spelling
to check for specific prefixes in drectve section flags.

In addition to being significantly cheaper and not relying on
a debugging interface, this also avoids creating a temporary string and
binding it to StringRef variable. We then went on to access it after the
memory had been deallocated.

This bug too was caught by ASan. I love ASan so much. =]

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193487 91177308-0d34-0410-b5e6-96231b3b80d8
[MachO] pointer align linker generated (non)lazy pointers

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193551 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Set section name for BSS atoms.

This change has no effect now, but will be needed to emit BSS atoms
to .bss section.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193556 91177308-0d34-0410-b5e6-96231b3b80d8
Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193557 91177308-0d34-0410-b5e6-96231b3b80d8