| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
In r314227, it wasn't always, and would thus contain random garbage.
llvm-svn: 314256
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds support for dynamic relocations (allocated
SHT_REL/SHT_RELA sections with a dynamic symbol table as their link).
The binary I added for the test is here:
https://drive.google.com/file/d/0B3gtIAmiMwZXSjJUZE9pUjd4M0k/view?usp=sharing
Unless support for dynamic symbol tables in yaml2obj is added this is
needed.
Differential Revision: https://reviews.llvm.org/D37915
llvm-svn: 314227
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change refactors some of the code to allow for some code
deduplication in later diffs as well as just to make adding a new
section type more self contained to the class itself. The idea for this
was first mentioned by James in D 37915 and will be used in that change
as recommended.
This change follows changes for dynamic sections but precedes support
for dynamic relocations.
Differential Revision: https://reviews.llvm.org/D38008
llvm-svn: 314148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I overzealously landed this before I was sure that another change
wouldn't break the build that this change depends on.
This change adds support for sections involved in dynamic loading such
as SHT_DYNAMIC, SHT_DYNSYM, and allocated string tables.
The two added binaries used for tests can be downloaded here and here
Differential Revision: https://reviews.llvm.org/D36560
llvm-svn: 313767
|
|
|
|
|
|
|
|
|
|
|
| |
I didn't initialize a pointer to be nullptr that I needed to.
This change adds support for nested and even overlapping segments. This means
that PT_PHDR, PT_GNU_RELRO, PT_TLS, and PT_DYNAMIC can be supported properly.
Differential Revision: https://reviews.llvm.org/D36558
llvm-svn: 313682
|
|
|
|
|
|
|
| |
This reverts commit r313663. Broken because overlapping-sections was
reverted.
llvm-svn: 313665
|
|
|
|
|
|
| |
This reverts commit r313656. Appears to be broken on Windows.
llvm-svn: 313664
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds support for sections involved in dynamic loading such
as SHT_DYNAMIC, SHT_DYNSYM, and allocated string tables.
The two added binaries used for tests can be downloaded [[
https://drive.google.com/file/d/0B3gtIAmiMwZXOXE3T0RobFg4ZTg/view?usp=sharing
| here ]] and [[
https://drive.google.com/file/d/0B3gtIAmiMwZXTFJSQUJZMGxNSXc/view?usp=sharing
| here ]]
Differential Revision: https://reviews.llvm.org/D36560
llvm-svn: 313663
|
|
|
|
|
|
|
|
|
| |
This change adds support for nested and even overlapping segments. This means
that PT_PHDR, PT_GNU_RELRO, PT_TLS, and PT_DYNAMIC can be supported properly.
Differential Revision: https://reviews.llvm.org/D36558
llvm-svn: 313656
|
|
|
|
| |
llvm-svn: 313404
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed on llvm-commits it was decided it would be best to check
e_machine before declaring that a reserved section index is valid. The
only special e_machine value that matters here is EM_HEXAGON. This
change adds a special check for EM_HEXAGON.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D37767
llvm-svn: 313114
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
greater than SHN_LORESERVE
As is indexes above SHN_LORESERVE will not be handled correctly because
they'll be treated as indexes of sections rather than special values
that should just be copied. This change adds support to copy them
though.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D37393
llvm-svn: 312756
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds support for SHT_REL and SHT_RELA sections in
llvm-objcopy.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D36554
llvm-svn: 312680
|
|
|
|
|
|
| |
This reverts r312643 because it's failing on llvm-i686-linux-RA.
llvm-svn: 312645
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds support for SHT_REL and SHT_RELA sections in
llvm-objcopy.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D36554
llvm-svn: 312643
|
|
|
|
|
|
|
|
|
|
| |
This change adds support for SHT_SYMTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D34167
llvm-svn: 311974
|
|
|
|
|
|
| |
This reverts commit r311826 because it's failing on llvm-i686-linux-RA.
llvm-svn: 311827
|
|
|
|
|
|
|
|
|
|
| |
This change adds support for SHT_SYMTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D34167
llvm-svn: 311826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current file layout algorithm in llvm-objcopy is simple but
difficult to reason about. It also makes it very complicated to support
nested segments and to support segments that have offsets that come
before a point after the program headers. To support these cases and
simplify one of the most critical parts llvm-objcopy I rewrote the
layout algorithm. Laying out segments first solves most of the issues
encountered by the previous algorithm.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D36494
llvm-svn: 311825
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cover no sections
Sometimes LLD will produce a PT_LOAD segment that only covers the
headers (and covers no sections). GNU objcopy does not output the
segment contents for these sections. In particular this is an issue in
building magenta because the final link step for the kernel would
produce just such a PT_LOAD segment. This change is to support this case
and to match what GNU objcopy does in this case.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D36196
llvm-svn: 310149
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
llvm-objcopy"
This change adds the "-O binary" flag which directs llvm-objcopy to
output the object file to the same format as GNU objcopy does when given
the flag "-O binary". This was done by splitting the Object class into
two subclasses ObjectELF and ObjectBianry which each output a different
format but relay on the same code to read in the Object in Object.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D34480
llvm-svn: 310127
|
|
|
|
|
|
|
|
|
|
| |
llvm-objcopy"
This breaks the build on clang-s390x-linux.
This reverts commit r310018.
llvm-svn: 310026
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
llvm-objcopy"
This change adds the "-O binary" flag which directs llvm-objcopy to
output the object file to the same format as GNU objcopy does when given
the flag "-O binary". This was done by splitting the Object class into
two subclasses ObjectELF and ObjectBianry which each output a different
format but relay on the same code to read in the Object in Object.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D34480
llvm-svn: 310018
|
|
|
|
|
|
|
|
|
|
| |
in llvm-objcopy""
This is failing to compile on 32-bit ARM bots.
This reverts commit r309768.
llvm-svn: 309771
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
llvm-objcopy"
This change adds the "-O binary" flag which directs llvm-objcopy to
output the object file to the same format as GNU objcopy does when given
the flag "-O binary". This was done by splitting the Object class into
two subclasses ObjectELF and ObjectBianry which each output a different
format but relay on the same code to read in the Object in Object.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D34480
llvm-svn: 309768
|
|
|
|
|
|
|
|
|
|
|
| |
llvm-objcopy"
The change seems to be failing on bots which are using gcc and bfd.ld
as a host compiler and linker.
This reverts commit r309658.
llvm-svn: 309660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds the "-O binary" flag which directs llvm-objcopy to
output the object file to the same format as GNU objcopy does when given
the flag "-O binary". This was done by splitting the Object class into
two subclasses ObjectELF and ObjectBianry which each output a different
format but relay on the same code to read in the Object in Object.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D34480
llvm-svn: 309658
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).
This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D33964
llvm-svn: 309643
|
|
|
|
|
|
|
|
|
|
| |
started""
This change is failing tests on Windows bots due to permissions.
This reverts commit r309249.
llvm-svn: 309251
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).
This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D33964
llvm-svn: 309249
|
|
|
|
|
|
|
|
| |
started""
This reverts commit 960873b10dd071298c817ba74ef2228f94ead7a1.
llvm-svn: 309037
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).
This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D33964
llvm-svn: 309032
|
|
|
|
|
|
|
|
| |
started""
This reverts commit 2b52298eb28ba4d3eca113353a348c02a6ef1f93.
llvm-svn: 308822
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).
This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D33964
llvm-svn: 308821
|
|
|
|
|
|
| |
This reverts commit 2f423248e140b94b8377660d4d2fe9364f30febe.
llvm-svn: 308806
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).
This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D33964
llvm-svn: 308803
|
|
|
|
|
|
| |
This reverts commit 98f9792e7ca5bbd9eb43bda72bf497957cfb6eb8.
llvm-svn: 308569
|
|
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).
This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D33964
llvm-svn: 308559
|