LLVM backend for 6502
Go to file
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
autoconf ARM64: initial backend import 2014-03-29 10:18:08 +00:00
bindings [python-bindings] Remove some cruft that snuck in. 2014-02-23 04:43:26 +00:00
cmake Teach LLVMConfigVersion.cmake to behave as find_package() expects. 2014-04-16 23:15:31 +00:00
docs Remove -simplify-libcalls pass form Passes documentation 2014-04-18 21:19:06 +00:00
examples Fix warnings about an variable only used in asserts. 2014-03-06 06:35:46 +00:00
include OnDiskHashTable: Expect the Info type to declare the offset type 2014-04-18 20:39:46 +00:00
lib Update the fragments of symbols in compressed sections. 2014-04-18 21:24:12 +00:00
projects Remove projects/sample. 2014-03-12 22:40:22 +00:00
test Update the fragments of symbols in compressed sections. 2014-04-18 21:24:12 +00:00
tools Atomics: promote ARM's IR-based atomics pass to CodeGen. 2014-04-17 18:22:47 +00:00
unittests Make the User::value_op_iterator a random access iterator. I had written 2014-04-17 09:07:50 +00:00
utils Fixed llvm-build when no targets are enabled 2014-04-18 17:39:50 +00:00
.arcconfig Updated phabricator server. 2014-04-07 03:57:04 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.gitignore Remove projects/sample. 2014-03-12 22:40:22 +00:00
CMakeLists.txt [CMake] Reformat, if(MSVC)...else()...endif() 2014-04-14 21:58:19 +00:00
CODE_OWNERS.TXT ARM Linux support 2014-04-02 23:03:28 +00:00
configure ARM64: initial backend import 2014-03-29 10:18:08 +00:00
CREDITS.TXT Test commit. 2014-04-10 22:25:51 +00:00
LICENSE.TXT Remove projects/sample. 2014-03-12 22:40:22 +00:00
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile [configure/make] Propagate names of build host tools when making BuildTools 2014-03-25 21:45:41 +00:00
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables . 2012-12-07 01:43:23 +00:00
Makefile.config.in Add a --enable-clang-plugin-support option to configure. 2014-03-10 16:58:35 +00:00
Makefile.rules Use -std=gnu++11 on cygwin and mingw. 2014-03-12 20:01:15 +00:00
README.txt Revert "Test commit to check e-mail address. Please discard this." 2013-10-04 10:59:13 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.