From a63baf176f119d5db2c7e5195042ff7fae721f72 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 1 Apr 2016 17:11:42 +0000 Subject: [PATCH] Don't do extra work if -r is given. fixAbsoluteSymbols fixes linker-created symbol addresses. Since we don't create such symbols for relocatable output, we don't need to call this function. llvm-svn: 265154 --- lld/ELF/Writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index fa0bff2..fd74766 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -225,8 +225,8 @@ template void Writer::run() { assignAddresses(); assignFileOffsets(); setPhdrs(); + fixAbsoluteSymbols(); } - fixAbsoluteSymbols(); if (!openFile()) return; -- 2.7.4