llvm-6502/test/MC/ELF
Rafael Espindola 7486d92a6c Change how we iterate over relocations on ELF.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-30 03:05:14 +00:00
..
abs.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
alias-reloc.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
alias.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
align-bss.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
align-nops.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
align-size.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
align-text.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
align.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
bad-section.s Jörg Sonnenberger noticed that we were missing this test. 2011-01-24 19:40:38 +00:00
basic-elf-32.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
basic-elf-64.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
bracket-exprs.s split this test into arch specific pieces, so the ARM 2011-02-25 19:06:35 +00:00
bracket.s Restore r125595 (reverted in r126336) with modifications: 2011-02-24 21:59:22 +00:00
bss.ll
call-abs.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
cfi-adjust-cfa-offset.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-advance-loc2.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-def-cfa-offset.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-def-cfa-register.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-def-cfa.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-escape.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-offset.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-reg.s PR13754: llvm-mc/x86 crashes on .cfi directives without the % prefix for registers. 2012-09-07 14:51:35 +00:00
cfi-register.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-rel-offset2.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-rel-offset.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-remember.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-restore.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-same-value.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-sections.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
cfi-signal-frame.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
cfi-undefined.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi-zero-addr-delta.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
cfi.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
comdat.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
common2.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
common.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
comp-dir.s Now that llvm-dwarfdump supports flags to specify which DWARF section to dump, 2013-01-25 21:44:53 +00:00
debug-line.s Add support for DWARF line number table entries for values in the instruction 2013-05-25 21:56:53 +00:00
debug-loc.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
diff2.s Add a MCObjectFormat class so that code common to all targets that use a 2010-10-16 18:23:53 +00:00
diff.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
elf_directive_previous.s actually, move the elf tests into the existing elf dir. 2010-10-02 18:53:48 +00:00
elf_directive_section.s actually, move the elf tests into the existing elf dir. 2010-10-02 18:53:48 +00:00
empty-dwarf-lines.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
empty.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
entsize.ll Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
entsize.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
fde.s Give this test an explicit triple. 2012-08-12 08:21:27 +00:00
file.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
gen-dwarf.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
global-offset.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
got.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
ident.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
invalid-symver.s Produce an error for an invalid use of .symver. 2010-10-27 17:56:18 +00:00
lcomm.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
leb128.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
lit.local.cfg Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu 2012-03-25 09:02:19 +00:00
local-reloc.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
many-section.s In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), and isWeak(), with a bitset of flags. 2012-02-28 23:47:53 +00:00
many-sections-2.s Implements low-level object file format specific output for COFF and 2013-04-03 18:31:38 +00:00
merge.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
n_bytes.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
no-fixup.s Rewrite a test to check actual output rather than intermediate implementation 2013-03-01 20:54:00 +00:00
noexec.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
norelocation.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
org.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
pic-diff.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
plt.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
pr9292.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
relax-all-flag.s Add a test for explicitly exercising the mc-relax-all flag. 2012-12-10 20:36:01 +00:00
relax-arith.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
relax-crash.s Relax dwarf line fragments. This fixes a crash in the included testcase. 2010-11-07 02:07:12 +00:00
relax.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
relocation-386.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
relocation-pc.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
relocation.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
rename.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
section-quoting.s Be nice to Xcore and the XMOS assembler and avoid quoting section names 2011-03-04 20:03:14 +00:00
section.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
set.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
sleb.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
subsection.s Add support for subsections to the ELF assembler. Fixes PR8717. 2013-04-17 21:18:16 +00:00
symref.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
tls-i386.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
tls.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
type.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
uleb.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
undef2.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
undef.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
version.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
weak-relocation.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
weak.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
weakref-plt.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
weakref-reloc.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
weakref.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00
x86_64-reloc-sizetest.s Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
zero.s Replace coff-/elf-dump with llvm-readobj 2013-04-12 04:06:46 +00:00