| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 223346
|
|
|
|
|
|
| |
indicator bit
llvm-svn: 222726
|
|
|
|
|
|
|
|
|
|
| |
For historical reasons archives on mach-o have two possible names for the
file containing the table of contents for the archive: "__.SYMDEF SORTED"
and "__.SYMDEF". But the libObject archive reader only supported the former.
This patch fixes llvm::object::Archive to support both names.
llvm-svn: 221747
|
|
|
|
|
|
|
| |
The MRI scripts have to work with CRLF, and in general it is probably
a good idea to support this in a core utility like LineIterator.
llvm-svn: 221153
|
|
|
|
| |
llvm-svn: 219480
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Long section names are represented as a slash followed by a numeric
ASCII string. This number is an offset into a string table.
Print the appropriate entry in the string table instead of the less
enlightening /4.
N.B. yaml2obj already does the right thing, this test exercises both
sides of the (de-)serialization.
llvm-svn: 219458
|
|
|
|
|
|
|
|
| |
It would prevent the display of a single byte instruction before a label.
Patch by Steve King!
llvm-svn: 215837
|
|
|
|
| |
llvm-svn: 213327
|
|
|
|
|
|
| |
obj2yaml and yaml2obj tools.
llvm-svn: 212908
|
|
|
|
|
|
| |
Recognize only flags which correspond to the current target.
llvm-svn: 212880
|
|
|
|
|
|
|
| |
It is not clear if llvm.global_ctors should or should not be in llvm.metadata,
but in practice it is not and we need to ignore it for LTO.
llvm-svn: 212351
|
|
|
|
| |
llvm-svn: 212344
|
|
|
|
|
|
|
|
| |
This is a test for the fix in r211904.
Differential Revision: http://reviews.llvm.org/D4349
llvm-svn: 212059
|
|
|
|
|
|
| |
ELFObjectFile:getArch() method.
llvm-svn: 211891
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and the -l option for the long format. Also when the object is a Mach-O
file and the format is berkeley produce output like darwin’s default size(1)
summary berkeley derived output.
Like System V format, there are also some small changes in how and where
the file names and archive member names are printed for darwin and
Mach-O.
Like the changes to llvm-nm these are the first steps in seeing if it is
possible to make llvm-size produce the same output as darwin's size(1).
llvm-svn: 211117
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes llvm-nm ignore members that are not sufficiently aligned for
lib/Object to handle.
These archives are invalid. GNU AR is able to handle this, but in general
just warns about broken archive members.
We should probably start warning too, but for now just make sure llvm-nm
exits with an 0.
llvm-svn: 211036
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a first step in seeing if it is possible to make llvm-nm produce
the same output as darwin's nm(1). Darwin's default format is bsd but its
-m output prints the longer Mach-O specific details. For now I added the
"-format darwin" to do this (whos name may need to change in the future).
As there are other Mach-O specific flags to nm(1) which I'm hoping to add some
how in the future. But I wanted to see if I could get the correct output for
-m flag using llvm-nm and the libObject interfaces.
I got this working but would love to hear what others think about this approach
to getting object/format specific details printed with llvm-nm.
llvm-svn: 210285
|
|
|
|
|
|
|
|
| |
so that llvm-size will total up all the sections in the Berkeley format. This
allows for rough categorizations for Mach-O sections. And allows the total of
llvm-size’s Berkeley and System V formats to be the same.
llvm-svn: 209158
|
|
|
|
|
|
| |
containing archives). First step as other tools will be updated next.
llvm-svn: 208812
|
|
|
|
|
|
|
|
|
| |
obj2yaml would fail when seeing a Weak External auxiliary record with a
characteristics field holding zero instead of one of
IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY, IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY,
or IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY.
llvm-svn: 205911
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The IO normalizer would essentially lump I386 and AMD64 relocations
together. Relocation types with the same numeric value would then get
mapped in appropriately.
For example:
IMAGE_REL_AMD64_ADDR64 and IMAGE_REL_I386_DIR16 both have a numeric
value of one. We would see IMAGE_REL_I386_DIR16 in obj2yaml conversions
of object files with a machine type of IMAGE_FILE_MACHINE_AMD64.
llvm-svn: 205746
|
|
|
|
|
|
| |
With that, fix the symbolizer to work with any ELF file.
llvm-svn: 205588
|
|
|
|
| |
llvm-svn: 205500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r205479.
It turns out that nm does use addresses, it is just that every reasonable
relocatable ELF object has sections with address 0. I have no idea if those
exist in reality, but it at least it shows that llvm-nm should use the name
address.
The added test was includes an unusual .o file with non 0 section addresses. I
created it by hacking ELFObjectWriter.cpp.
Really sorry for the churn.
llvm-svn: 205493
|
|
|
|
|
|
|
| |
obj2yaml would emit the NUL bytes padding the auxiliary file symbol
records. Trimming them looks nicer.
llvm-svn: 204314
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current state of affairs has auxiliary symbols described as a big
bag of bytes. This is less than satisfying, it detracts from the YAML
file as being human readable.
Instead, allow for symbols to optionally contain their auxiliary data.
This allows us to have a much higher level way of describing things like
weak symbols, function definitions and section definitions.
This depends on D3105.
Differential Revision: http://llvm-reviews.chandlerc.com/D3092
llvm-svn: 204214
|
|
|
|
| |
llvm-svn: 200818
|
|
|
|
| |
llvm-svn: 200808
|
|
|
|
| |
llvm-svn: 200803
|
|
|
|
| |
llvm-svn: 199898
|
|
|
|
|
|
|
| |
There is still a long way to go for llvm-nm, but at least we now match
nm's letter output in the cases we test for.
llvm-svn: 193912
|
|
|
|
|
|
|
| |
The patch reviewed by Michael Spencer.
http://llvm-reviews.chandlerc.com/D1846
llvm-svn: 192093
|
|
|
|
|
|
|
| |
Only implemented in the Mach-O ObjectSymbolizer.
The testcase sadly introduces a new binary.
llvm-svn: 188879
|
|
|
|
|
|
|
|
| |
* ELFTypes.h contains template magic for defining types based on endianess, size, and alignment.
* ELFFile.h defines the ELFFile class which provides low level ELF specific access.
* ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface.
llvm-svn: 188022
|
|
|
|
|
|
|
|
|
|
|
|
| |
If no other operation is specified, 's' becomes an operation instead of an
modifier. The s operation just creates a symbol table. It is the same as
running ranlib.
We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and
if the symbol table is present, then it is current. We use that to optimize
the most common case: a broken build system that thinks it has to run ranlib.
llvm-svn: 187353
|
|
|
|
|
|
|
|
|
|
|
| |
The symbol table has forward references in the file. Instead of allocating
a temporary buffer or counting the size and then writing, this implementation
writes a dummy value first and patches it once the final value is known.
There is room for performance improvement. I will implement them as soon as I
get some other features (like a ranlib mode) in.
llvm-svn: 186934
|
|
|
|
| |
llvm-svn: 186206
|
|
|
|
| |
llvm-svn: 186202
|
|
|
|
| |
llvm-svn: 186192
|
|
|
|
| |
llvm-svn: 186159
|
|
|
|
|
|
|
|
| |
There is no lib/Archive anymore and some archive tests were in test/Archive and
others in test/Object. Since archive is just one of the formats supported by
lib/Object, test/Object is probably the best location.
llvm-svn: 186038
|
|
|
|
| |
llvm-svn: 185664
|
|
|
|
|
|
| |
While there, use early returns to reduce nesting.
llvm-svn: 185547
|
|
|
|
| |
llvm-svn: 184191
|
|
|
|
|
|
|
|
|
|
| |
This test case was a "sanity check"/"breathing" test case at first, but
is really fragile, which impairs changes to yaml2obj.
`test/Object/yaml2obj-elf-bits-endian.test` is much more robust and
serves as an adequate sanity check.
llvm-svn: 183811
|
|
|
|
|
|
| |
Should bring bots back to life.
llvm-svn: 183715
|
|
|
|
|
|
|
|
|
| |
Currently, only emitting the ELF header is supported (no sections or
segments).
The ELFYAML code organization is broadly similar to the COFFYAML code.
llvm-svn: 183711
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from the LC_DATA_IN_CODE load command. And when disassembling print
the data in code formatted for the kind of data it and not disassemble those
bytes.
I added the format specific functionality to the derived class MachOObjectFile
since these tables only appears in Mach-O object files. This is my first
attempt to modify the libObject stuff so if folks have better suggestions
how to fit this in or suggestions on the implementation please let me know.
rdar://11791371
llvm-svn: 183424
|
|
|
|
| |
llvm-svn: 183403
|
|
|
|
|
|
|
|
| |
In ELF (as in MachO), not all relocations point to symbols. Represent this
properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj
ELF's dumper to handle relocatios without symbols.
llvm-svn: 183284
|