| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 242236
|
|
|
|
|
|
|
|
|
|
| |
For now the Archive owns the buffers of the thin archive members.
This makes for a simple API, but all the buffers are destructed
only when the archive is destructed. This should be fine since we
close the files after mmap so we should not hit an open file
limit.
llvm-svn: 242215
|
|
|
|
|
|
| |
This matches the gnu ar behavior.
llvm-svn: 242162
|
|
|
|
|
|
| |
Might fix pr24106.
llvm-svn: 242158
|
|
|
|
| |
llvm-svn: 242156
|
|
|
|
| |
llvm-svn: 242151
|
|
|
|
|
|
| |
Sorry about that.
llvm-svn: 242083
|
|
|
|
|
|
| |
This is important for thin archives.
llvm-svn: 242082
|
|
|
|
| |
llvm-svn: 242061
|
|
|
|
| |
llvm-svn: 241937
|
|
|
|
|
|
| |
This time without breaking the bots.
llvm-svn: 241869
|
|
|
|
|
|
|
|
|
| |
They should probably be created on anything that is not windows or linux, but I will
test on freebsd before changing that.
With this it is possible to bootstrap with llvm-ar instead of ar+ranlib on OS X.
llvm-svn: 241849
|
|
|
|
|
|
|
| |
It looks like ld64 requires it. With this we seem to be able to bootstrap using
llvm-ar+/usr/bin/true instead of ar+ranlib (currently on stage2).
llvm-svn: 241842
|
|
|
|
| |
llvm-svn: 241835
|
|
|
|
| |
llvm-svn: 241834
|
|
|
|
| |
llvm-svn: 241815
|
|
|
|
|
|
|
| |
This could be optimized and for now we only produce __.SYMDEF
and not "__.SYMDEF SORTED".
llvm-svn: 241814
|
|
|
|
| |
llvm-svn: 241781
|
|
|
|
| |
llvm-svn: 241765
|
|
|
|
|
|
| |
It is pretty unambiguous how to interpret it and gnu ar accepts it too.
llvm-svn: 241750
|
|
|
|
|
|
|
|
| |
No support for the symbol table yet (but will hopefully add it today).
We always use the long filename format so that we can align the member,
which is an advantage of the BSD format.
llvm-svn: 241721
|
|
|
|
|
|
|
|
| |
Use AddressAlign field's value to properly align sections content in the
yaml2obj tool. Before this change the yaml2obj ignored AddressAlign and
always aligned section on 16 bytes boundary.
llvm-svn: 241674
|
|
|
|
| |
llvm-svn: 241669
|
|
|
|
|
|
|
|
|
|
|
| |
getSymbolValue now returns a value that in convenient for most callers:
* 0 for undefined
* symbol size for common symbols
* offset/address for symbols the rest
Code that needs something more specific can check getSymbolFlags.
llvm-svn: 241605
|
|
|
|
|
|
|
|
|
| |
They are implemented like that in some object formats, but for the interface
provided by lib/Object, SF_Undefined and SF_Common are different things.
This matches the ELF and COFF implementation and fixes llvm-nm for MachO.
llvm-svn: 241587
|
|
|
|
|
|
| |
This matches the behavior of gnu ld.
llvm-svn: 241512
|
|
|
|
|
|
| |
This matches gnu nm.
llvm-svn: 241488
|
|
|
|
|
|
| |
Printing the symbol size matches the behavior or both gnu nm and freebsd nm.
llvm-svn: 241480
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When talking about the virtual address of sections the coff spec says:
... for simplicity, compilers should set this to zero. Otherwise, it is an
arbitrary value that is subtracted from offsets during relocation.
We don't currently subtract it, so check that it is zero.
If some producer does create such files, we can change getRelocationOffset
instead.
llvm-svn: 241447
|
|
|
|
|
|
| |
Thanks to Aboud, Amjad for reporting the regression and providing the testcase.
llvm-svn: 241440
|
|
|
|
|
|
|
|
|
|
| |
SHT_NOBITS sections do not have content in an object file. Now the yaml2obj
tool does not accept `Content` field for such sections, and the obj2yaml
tool does not attempt to read the section content from a file.
Restore r241350 and r241352.
llvm-svn: 241377
|
|
|
|
|
|
|
|
|
|
|
| |
r241350 broke lld tests.
r241352 depends on r241350.
Original messages:
"[ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools"
"[ELFYAML] Make the Size field for .bss section optional"
llvm-svn: 241354
|
|
|
|
|
|
| |
It's a common case to have a zero-size .bss section in an object file.
llvm-svn: 241352
|
|
|
|
|
|
|
|
| |
SHT_NOBITS sections do not have content in an object file. Now yaml2obj
tool does not accept `Content` field for such sections, and obj2yaml
tool does not attempt to read the section content from a file.
llvm-svn: 241350
|
|
|
|
|
|
| |
Thanks to Sean Silva for the suggestion.
llvm-svn: 241255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also improves the logic of what is an error:
* getSection(uint_32): only return an error if the index is out of bounds. The
index 0 corresponds to a perfectly valid entry.
* getSection(Elf_Sym): Returns null for symbols that normally don't have
sections and error for out of bound indexes.
In many places this just moves the report_fatal_error up the stack, but those
can then be fixed in smaller patches.
llvm-svn: 241156
|
|
|
|
| |
llvm-svn: 241109
|
|
|
|
|
|
| |
We were already checking, but were missing a test.
llvm-svn: 241094
|
|
|
|
| |
llvm-svn: 241070
|
|
|
|
|
|
|
|
|
|
| |
This moves the error checking for string tables to getStringTable which returns
an ErrorOr<StringRef>.
This improves error checking, makes it uniform across all string tables and
makes it possible to check them once instead of once per name.
llvm-svn: 240950
|
|
|
|
|
|
| |
We were already checking this, but had no tests.
llvm-svn: 240945
|
|
|
|
| |
llvm-svn: 240944
|
|
|
|
|
|
|
|
| |
This case had been failing on testers that didn't have x86 support. Rather
than XFAIL it on testers without x86 support, I've just assembled it and used
the raw object as the test input.
llvm-svn: 240875
|
|
|
|
|
|
|
|
|
|
| |
The parser provides a convenient interface for reading llvm stackmap v1 sections
in object files.
This patch also includes a new option for llvm-readobj, '-stackmap', which uses
the parser to pretty-print stackmap sections for debugging/testing purposes.
llvm-svn: 240860
|
|
|
|
|
|
| |
stripped.
llvm-svn: 240703
|
|
|
|
|
|
| |
This matches the behavior of gnu nm. Fixes pr23930.
llvm-svn: 240695
|
|
|
|
|
|
| |
This matches gnu nm and has the advantage that there is a upper case N.
llvm-svn: 240655
|
|
|
|
|
|
|
| |
We ought to also emit unmangled references to dllimported functions,
but no existing linker needs this.
llvm-svn: 240562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
COFF and MachO only define symbol sizes for common symbols. Reflect that
in the class hierarchy by having a method for common symbols only in the base
and a general one in ELF.
This avoids the need of using a magic value for the size, which had a few
problems
* Most callers didn't check for it.
* The ones that did could not tell the magic value from a file actually having
that value.
llvm-svn: 240529
|
|
|
|
|
|
|
|
|
|
|
| |
Only common symbol on MachO and COFF have a size.
For COFF we already had a custom format.
For MachO, there is no native objdump and we were printing it as ELF. Now
we only print the sizes for symbols that actually have them.
llvm-svn: 240422
|