[clang] 15b9dc4 - Revert "[AVR] Explicitly set the address of the data section when invoking the linker"
Dylan McKay via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 23 03:23:22 PDT 2020
Author: Dylan McKay
Date: 2020-06-23T22:23:05+12:00
New Revision: 15b9dc46c6d2eed64dc72143172f5fb0d4049f33
URL: https://github.com/llvm/llvm-project/commit/15b9dc46c6d2eed64dc72143172f5fb0d4049f33
DIFF: https://github.com/llvm/llvm-project/commit/15b9dc46c6d2eed64dc72143172f5fb0d4049f33.diff
LOG: Revert "[AVR] Explicitly set the address of the data section when invoking the linker"
This reverts commit ede6005e7092ddae454e4d365d8adefeaec1f5e3.
Ayke suggests this value varies chip-by-chip, and thus it is not safe to
hardcode to 0x800100.
Proper logic for this linker parameter will have to be wired up in a
follow up patch.
Added:
Modified:
clang/lib/Driver/ToolChains/AVR.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/AVR.cpp b/clang/lib/Driver/ToolChains/AVR.cpp
index a86d6fa9f357..d1006796d595 100644
--- a/clang/lib/Driver/ToolChains/AVR.cpp
+++ b/clang/lib/Driver/ToolChains/AVR.cpp
@@ -118,13 +118,6 @@ void AVR::Linker::ConstructJob(Compilation &C, const JobAction &JA,
Args.AddAllArgs(CmdArgs, options::OPT_L);
getToolChain().AddFilePathLibArgs(Args, CmdArgs);
- // "Not [sic] that addr must be offset by adding 0x800000 the to
- // real SRAM address so that the linker knows that the address
- // is in the SRAM memory space."
- //
- // - https://www.nongnu.org/avr-libc/user-manual/mem_sections.html
- CmdArgs.push_back("-Tdata=0x800100");
-
// If the family name is known, we can link with the device-specific libgcc.
// Without it, libgcc will simply not be linked. This matches avr-gcc
// behavior.
More information about the cfe-commits
mailing list