llvm-6502/test/MC/ELF
David Blaikie 037da24c10 Update the fragments of symbols in compressed sections.
While unnamed relocations are already cached in side tables in
ELFObjectWriter::RecordRelocation, symbols still need their fragments
updated to refer to the newly compressed fragment (even if that fragment
isn't big enough to fit the offset). Even though we only create
temporary symbols in debug info sections this comes up in 32 bit builds
where even temporary symbols in mergeable sections (such as debug_str)
have to be emitted as named symbols.

I tried a few other ways to do this but they all didn't work for various
reasons:

1) Canonicalize the MCSymbolData in RecordRelocation, nulling out the
Fragment (so it didn't have to be updated by CompressDebugSection). This
doesn't work because some code relies on symbols having fragments to
indicate that they're defined, I think.

2) Canonicalize the MCSymbolData in RecordRelocation to be "first
fragment + absolute offset" so it would be cheaper to just test and
update the fragment in CompressDebugSections. This doesn't work because
the offset computed in RecordRelocation isn't that of the symbol's
fragment, it's the passed in fragment (I haven't figured out what that
fragment is - perhaps it's the location where the relocation is to be
written). And if the fragment offset has to be computed only for this
use we might as well just do it when we need to, in
CompressDebugSection.

I also added an assert to help catch this a bit more clearly, even
though it is UB. The test case improvements would either assert fail
and/or valgrind vail without the fix, even if they wouldn't necessarily
fail the FileCheck output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206653 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-18 21:24:12 +00:00
..
abs.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
alias-reloc.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
alias.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
align-bss.s
align-nops.s
align-size.s
align-text.s
align.s
bad-expr2.s Completely rewrite ELFObjectWriter::RecordRelocation. 2014-03-29 06:26:49 +00:00
bad-expr3.s Completely rewrite ELFObjectWriter::RecordRelocation. 2014-03-29 06:26:49 +00:00
bad-expr.s Forgot to add testcase for r198590 2014-01-21 20:39:11 +00:00
bad-relocation.s MC asm parser: allow ?'s in symbol names, and handle @'s in names in MS asm 2013-10-18 20:46:28 +00:00
bad-section.s
basic-elf-32.s Work around gold bug http://sourceware.org/PR16794. 2014-04-02 12:15:20 +00:00
basic-elf-64.s
bracket-exprs.s
bracket.s
bss-large.ll
bss.ll
call-abs.s
cfi-adjust-cfa-offset.s
cfi-advance-loc2.s
cfi-def-cfa-offset.s
cfi-def-cfa-register.s
cfi-def-cfa.s
cfi-escape.s
cfi-offset.s
cfi-reg.s
cfi-register.s
cfi-rel-offset2.s
cfi-rel-offset.s
cfi-remember.s
cfi-restore.s
cfi-same-value.s
cfi-sections.s
cfi-signal-frame.s
cfi-undefined.s
cfi-window-save.s Implements parsing and emitting of .cfi_window_save in MC. 2013-09-26 14:49:40 +00:00
cfi-zero-addr-delta.s
cfi.s MC: Add support for .cfi_startproc simple 2014-01-27 17:20:25 +00:00
comdat-dup-group-name.s MC: Support multiple sections with the same name in the same comdat group 2013-10-22 23:41:52 +00:00
comdat-reloc.s
comdat.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
common2.s
common.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
comp-dir.s X86MCAsmInfoGNUCOFF: Set PointerSize as 8 for targeting x64. It caused DW_LNE_set_address was misemitted on x64. 2014-04-08 15:28:50 +00:00
compression.s Update the fragments of symbols in compressed sections. 2014-04-18 21:24:12 +00:00
debug-line2.s
debug-line.s Emit DWARF line entries for all data in the instruction stream. 2013-10-20 02:16:18 +00:00
debug-loc.s
diff2.s
diff.s
discriminator.s Support DWARF discriminators in object streamer. 2014-02-14 19:27:53 +00:00
dot-symbol-assignment.s Add support for assigning to . in AsmParser. 2014-02-17 20:48:32 +00:00
elf_directive_previous.s
elf_directive_section.s
empty-dwarf-lines.s
empty.s
entsize.ll
entsize.s
fde.s
file-double.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
file.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
gen-dwarf.s DebugInfo: Avoid creating unnecessary/empty line tables and remove the special case of '0' in DwarfCompileUnit::initStmtList by just always using a label difference 2014-04-01 08:07:52 +00:00
global-offset.s
got.s
ident.s
ifunc-reloc.s Force emit a relocation for @gnu_indirect_function symbols so that the indirect 2014-01-08 18:50:32 +00:00
invalid-symver.s
lcomm.s
leb128.s
lit.local.cfg [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
local-reloc.s Fix broken CHECK lines 2014-02-16 07:31:05 +00:00
many-sections-2.s Correctly detect if a symbol uses a reserved section index or not. 2014-03-26 00:16:43 +00:00
many-sections.s Create .symtab_shndxr only when needed. 2014-03-25 23:44:25 +00:00
merge.s Completely rewrite ELFObjectWriter::RecordRelocation. 2014-03-29 06:26:49 +00:00
n_bytes.s
no-fixup.s
nocompression.s llvm/test/MC/ELF/nocompression.s: Loosen an expression to match "llvm-mc.EXE". 2014-03-30 14:04:00 +00:00
noexec.s
norelocation.s
offset.s Correctly propagates st_size. 2014-03-27 00:28:24 +00:00
org.s
pic-diff.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
plt.s
pr9292.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
relax-all-flag.s
relax-arith.s
relax-crash.s
relax.s
relocation-386.s Work around gold bug http://sourceware.org/PR16794. 2014-04-02 12:15:20 +00:00
relocation-pc.s Completely rewrite ELFObjectWriter::RecordRelocation. 2014-03-29 06:26:49 +00:00
relocation.s Fix up MCFixup::getAccessVariant to handle unary expressions. 2014-04-14 16:50:22 +00:00
rename.s
section-quoting.s
section.s ELF: Parse types in directives like binutils gas 2013-09-21 05:25:12 +00:00
set.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
sleb.s
subsection.s
symbol-names.s MC asm parser: allow ?'s in symbol names, and handle @'s in names in MS asm 2013-10-18 20:46:28 +00:00
symref.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
tls-i386.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
tls.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
type-propagate.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
type.s In the ELFWriter when writing aliased (.set) symbols dont blindly 2014-01-07 20:17:03 +00:00
uleb.s
undef2.s
undef.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
version.s
weak-relocation.s
weak.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
weakref-plt.s
weakref-reloc.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
weakref.s Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
x86_64-reloc-sizetest.s
zero.s