| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The compiler occasionally generates multiple .loc directives in a row
(at the same instruction address). These need to be transformed into
multple actual .debug_line table entries, since they are used to signal
certain information to the debugger (e.g. if the opening brace of a
function body is on the same line as the declaration).
The MCAsmStreamer version of EmitDwarfLocDirective handles this
correctly by emitting a .loc directive every time it is called.
However, the MCObjectStream version simply defaults to recording
the information and emitting only a single table entry later,
e.g. when EmitInstruction is called.
This patch introduces a MCAsmStreamer::EmitDwarfLocDirective
version that emits a line table entry for a .loc directive
that may already be pending before recording the new directive.
(This is similar to how this is handled in GNU as.)
With this patch (and the code alignment factor patch) applied,
I'm now getting identical DWARF .debug sections for all test-suite
object files on PowerPC for the internal and the external assembler.
llvm-svn: 184357
|
|
|
|
|
|
|
|
| |
The first symbol on ELF is dummy, but it has a defined content and readelf
normally displays it. With this change llvm-readobj also displays it and we
can check that llvm-mc output is correct according to the standard.
llvm-svn: 183337
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For COFF and MachO, sections semantically have relocations that apply to them.
That is not the case on ELF.
In relocatable objects (.o), a section with relocations in ELF has offsets to
another section where the relocations should be applied.
In dynamic objects and executables, relocations don't have an offset, they have
a virtual address. The section sh_info may or may not point to another section,
but that is not actually used for resolving the relocations.
This patch exposes that in the ObjectFile API. It has the following advantages:
* Most (all?) clients can handle this more efficiently. They will normally walk
all relocations, so doing an effort to iterate in a particular order doesn't
save time.
* llvm-readobj now prints relocations in the same way the native readelf does.
* probably most important, relocations that don't point to any section are now
visible. This is the case of relocations in the rela.dyn section. See the
updated relocation-executable.test for example.
llvm-svn: 182908
|
|
|
|
|
|
| |
stream.
llvm-svn: 182712
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D598
llvm-svn: 179725
|
|
|
|
| |
llvm-svn: 179361
|
|
|
|
|
|
|
|
| |
symbol with multiple .type declarations.
Differential Revision: http://llvm-reviews.chandlerc.com/D607
llvm-svn: 179184
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ELF with support for:
- File headers
- Section headers + data
- Relocations
- Symbols
- Unwind data (only COFF/Win64)
The output format follows a few rules:
- Values are almost always output one per line (as elf-dump/coff-dump already do). - Many values are translated to something readable (like enum names), with the raw value in parentheses.
- Hex numbers are output in uppercase, prefixed with "0x".
- Flags are sorted alphabetically.
- Lists and groups are always delimited.
Example output:
---------- snip ----------
Sections [
Section {
Index: 1
Name: .text (5)
Type: SHT_PROGBITS (0x1)
Flags [ (0x6)
SHF_ALLOC (0x2)
SHF_EXECINSTR (0x4)
]
Address: 0x0
Offset: 0x40
Size: 33
Link: 0
Info: 0
AddressAlignment: 16
EntrySize: 0
Relocations [
0x6 R_386_32 .rodata.str1.1 0x0
0xB R_386_PC32 puts 0x0
0x12 R_386_32 .rodata.str1.1 0x0
0x17 R_386_PC32 puts 0x0
]
SectionData (
0000: 83EC04C7 04240000 0000E8FC FFFFFFC7 |.....$..........|
0010: 04240600 0000E8FC FFFFFF31 C083C404 |.$.........1....|
0020: C3 |.|
)
}
]
---------- snip ----------
Relocations and symbols can be output standalone or together with the section header as displayed in the example.
This feature set supports all tests in test/MC/COFF and test/MC/ELF (and I suspect all additional tests using elf-dump), making elf-dump and coff-dump deprecated.
Patch by Nico Rieck!
llvm-svn: 178679
|
|
|
|
| |
llvm-svn: 178249
|
|
|
|
|
|
|
|
| |
This reverts commit c8d65364223a04b179958a50a4bf0f89b21dd7d2.
This broke a bunch of the buildbots.
llvm-svn: 178222
|
|
|
|
|
|
|
|
| |
Made sure we were looking a correct section
Added Mips32/64 as an extra check
Updated llvm-objdump to generate symbolic info for Mips relocations
llvm-svn: 178190
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a very late complement to r130637 which fixed this on x86_64. Fixes
pr15448.
Since it looks like that every elf architecture uses this encoding when using
cfi, make it the default for elf. Just exclude mips64el. It has a lovely
.ll -> .o test (ef_frame.ll) that tests that nothing changes in the binary
content of the .eh_frame produced by llc. Oblige it.
llvm-svn: 177141
|
|
|
|
|
|
| |
for choosing to emit a shndx was simply testing the wrong variable.
llvm-svn: 176762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
detail.
The was this test was written, it was relying on an implementation detail
(fixups) and hence was very brittle (relying, among other things, on the
exact ordering of statistics printed by MC).
The test was rewritten to check a more observable output difference. While it
doesn't cover 100% of the things the original test covered, it's a good
practice to write regression tests this way. If we want to check that
internal details and invariants hold, such tests should be expressed as unit
tests.
llvm-svn: 176377
|
|
|
|
|
|
|
| |
use them in tests that run llvm-dwarfdump. This is in order to make tests as
specific as possible.
llvm-svn: 173498
|
|
|
|
| |
llvm-svn: 170410
|
|
|
|
| |
llvm-svn: 170374
|
|
|
|
|
|
|
|
|
|
| |
compilation directory.
This defaults to the current working directory, just as it always has,
but now an assembler can choose to override it with a custom directory.
I've taught llvm-mc about this option and added a test case.
llvm-svn: 170371
|
|
|
|
| |
llvm-svn: 169764
|
|
|
|
|
|
|
| |
Also fixes a test that was overly-sensitive to the exact order of statistics
emitted.
llvm-svn: 169619
|
|
|
|
|
|
|
| |
to support it. Original patch with the parsing and plumbing by the PaX team and
Roman Divacky. I added the bits in MCDwarf.cpp and the test.
llvm-svn: 168565
|
|
|
|
|
|
| |
Roman Divacky. I just added the testcase.
llvm-svn: 168520
|
|
|
|
| |
llvm-svn: 167926
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Darwin lied about not supporting .lcomm and turned it into zerofill in the
asm parser. Push the zerofill-conversion down into macho-specific code.
- This makes the tri-state LCOMMType enum superfluous, there are no targets
without .lcomm.
- Do proper error reporting when trying to use .lcomm with alignment on a target
that doesn't support it.
- .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2.
- Fixes PR13755 (.lcomm crashes on ELF).
llvm-svn: 163395
|
|
|
|
|
|
|
|
|
| |
registers.
gas accepts this and it seems to be common enough to be worth supporting. This
doesn't affect the parsing of reg operands outside of .cfi directives.
llvm-svn: 163390
|
|
|
|
| |
llvm-svn: 161740
|
|
|
|
|
|
| |
of the range. Fixes PR13581!
llvm-svn: 161739
|
|
|
|
| |
llvm-svn: 156712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Removed test/lib/llvm.exp - it is no longer needed
* Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
left in the test suite so this code is no longer required. test/lit.cfg is
now much shorter and clearer
* Removed a lot of duplicate code in lit.local.cfg files that need access to
the root configuration, by adding a "root" attribute to the TestingConfig
object. This attribute is dynamically computed to provide the same
information as was previously provided by the custom getRoot functions.
* Documented the config.root attribute in docs/CommandGuide/lit.pod
llvm-svn: 153408
|
|
|
|
|
|
| |
and isWeak(), with a bitset of flags.
llvm-svn: 151670
|
|
|
|
|
|
|
|
|
|
| |
debug info for assembly files. We were already doing the right thing when
producing debug info for C/C++.
ELF linkers don't know dwarf, so they depend on these relocations to produce
valid dwarf output.
llvm-svn: 151655
|
|
|
|
|
|
|
|
| |
run with LIT now and now Dejagnu. dg.exp is no longer needed.
Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches.
llvm-svn: 150664
|
|
|
|
|
|
| |
EmitValue (literal values). Previously only called on expressions in instructions. New test cases added to tls.s, tls-i386.s. Resolves PR11981.
llvm-svn: 150582
|
|
|
|
| |
llvm-svn: 148733
|
|
|
|
| |
llvm-svn: 147356
|
|
|
|
| |
llvm-svn: 147352
|
|
|
|
| |
llvm-svn: 146377
|
|
|
|
|
|
|
|
| |
does. The _GLOBAL_OFFSET_TABLE_ is still magical in that we get a R_386_GOTPC,
but it doesn't change the immediate in the same way as when the expression
has no right hand side symbol.
llvm-svn: 146311
|
|
|
|
|
|
|
| |
previous commit. It is strange that we see it in 32 bits. We already
have a fixme about it.
llvm-svn: 146273
|
|
|
|
|
|
|
|
| |
symbol difference. This matches gas behavior and fixes PR11513.
We still don't handle _GLOBAL_OFFSET_TABLE_ in data sections.
llvm-svn: 146238
|
|
|
|
|
|
|
| |
that into account and test for no U's showing up in the middle, which is what
we really wanted to test for.
llvm-svn: 141653
|
|
|
|
|
|
|
| |
.symtab_shndx reading and writing together, and finally we have a testcase for
r141440.
llvm-svn: 141641
|
|
|
|
| |
llvm-svn: 136884
|
|
|
|
| |
llvm-svn: 136880
|
|
|
|
| |
llvm-svn: 136877
|
|
|
|
| |
llvm-svn: 136875
|
|
|
|
| |
llvm-svn: 136874
|
|
|
|
| |
llvm-svn: 136873
|
|
|
|
| |
llvm-svn: 136872
|
|
|
|
| |
llvm-svn: 136871
|