Don't blindly OR in the new value, but clear the existing one, since it can be nonzero. Read out the existing value before, and add into the desired offset. (The add is done outside of the applyMOV, to handle potential overflow between the two.) Patch by Martin Storsjö! llvm-svn: 277846
LLVM Linker (lld)
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.