diff --git a/src/backends/llvm/llvm_charset.c b/src/backends/llvm/llvm_charset.c
index 56e3e80c1d421f37d6bf32bd5a1ba20e393d6676..ae53f54f492170e513cc2e91079e80aaee8b2c52 100644
--- a/src/backends/llvm/llvm_charset.c
+++ b/src/backends/llvm/llvm_charset.c
@@ -857,6 +857,8 @@ static bool h_llvm_build_ir_for_bitmap(HLLVMParserCompileContext *ctxt,
   LLVMValueRef bitmap_initializer = LLVMConstArray(LLVMInt32Type(), bitmap_entries, 8);
   /* ...and we need a global variable to stick it in to GEP it */
   LLVMValueRef bitmap = LLVMAddGlobal(ctxt->mod, LLVMTypeOf(bitmap_initializer), "bitmap");
+  LLVMSetLinkage(bitmap, LLVMInternalLinkage);
+  LLVMSetGlobalConstant(bitmap, 1);
   LLVMSetInitializer(bitmap, bitmap_initializer);
 
   /* Compute the index into the bitmap */