]> git.sur5r.net Git - u-boot/commitdiff
ARC: Make sure .ivt section is not purged by garbage collector
authorAlexey Brodkin <abrodkin@synopsys.com>
Tue, 29 May 2018 17:29:16 +0000 (20:29 +0300)
committerAlexey Brodkin <abrodkin@synopsys.com>
Thu, 31 May 2018 17:13:29 +0000 (20:13 +0300)
Fixes commit fac4790491f6 ("arc: Eliminate unused code and data with GCC's garbage collector"),
see [1].

Since in case of ARCv2 .ivt only contains addrresses of
interrupt/exception handlers linker doesn't understand that this section
actually make a lot of sense and decides to get rid of it if we use
"--gc-sections".

And KEEP does exactly this, see [2].

[1] http://git.denx.de/?p=u-boot.git;a=commit;h=fac4790491f69b29755d92db2cad508849573ff7
[2] https://sourceware.org/binutils/docs/ld/Input-Section-Keep.html#Input-Section-Keep

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
arch/arc/cpu/u-boot.lds

index 73c642ed6bd9c0b5eb725b87ccd001f420f50e58..d5c88ef9d4d012b17d9c88e3eb2fa8d9c9747dba 100644 (file)
@@ -23,7 +23,7 @@ SECTIONS
        __ivt_start = .;
        .ivt :
        {
-               *(.ivt)
+               KEEP(*(.ivt))
        }
        __ivt_end = .;