mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
037da24c10
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 |
||
---|---|---|
.. | ||
abs.s | ||
alias-reloc.s | ||
alias.s | ||
align-bss.s | ||
align-nops.s | ||
align-size.s | ||
align-text.s | ||
align.s | ||
bad-expr2.s | ||
bad-expr3.s | ||
bad-expr.s | ||
bad-relocation.s | ||
bad-section.s | ||
basic-elf-32.s | ||
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 | ||
cfi-zero-addr-delta.s | ||
cfi.s | ||
comdat-dup-group-name.s | ||
comdat-reloc.s | ||
comdat.s | ||
common2.s | ||
common.s | ||
comp-dir.s | ||
compression.s | ||
debug-line2.s | ||
debug-line.s | ||
debug-loc.s | ||
diff2.s | ||
diff.s | ||
discriminator.s | ||
dot-symbol-assignment.s | ||
elf_directive_previous.s | ||
elf_directive_section.s | ||
empty-dwarf-lines.s | ||
empty.s | ||
entsize.ll | ||
entsize.s | ||
fde.s | ||
file-double.s | ||
file.s | ||
gen-dwarf.s | ||
global-offset.s | ||
got.s | ||
ident.s | ||
ifunc-reloc.s | ||
invalid-symver.s | ||
lcomm.s | ||
leb128.s | ||
lit.local.cfg | ||
local-reloc.s | ||
many-sections-2.s | ||
many-sections.s | ||
merge.s | ||
n_bytes.s | ||
no-fixup.s | ||
nocompression.s | ||
noexec.s | ||
norelocation.s | ||
offset.s | ||
org.s | ||
pic-diff.s | ||
plt.s | ||
pr9292.s | ||
relax-all-flag.s | ||
relax-arith.s | ||
relax-crash.s | ||
relax.s | ||
relocation-386.s | ||
relocation-pc.s | ||
relocation.s | ||
rename.s | ||
section-quoting.s | ||
section.s | ||
set.s | ||
sleb.s | ||
subsection.s | ||
symbol-names.s | ||
symref.s | ||
tls-i386.s | ||
tls.s | ||
type-propagate.s | ||
type.s | ||
uleb.s | ||
undef2.s | ||
undef.s | ||
version.s | ||
weak-relocation.s | ||
weak.s | ||
weakref-plt.s | ||
weakref-reloc.s | ||
weakref.s | ||
x86_64-reloc-sizetest.s | ||
zero.s |