mirror of
https://github.com/linux-sunxi/sunxi-tools.git
synced 2024-11-23 01:46:44 +08:00
776cf5543b
Add DISCARD directives to the linker scripts and also -marm option to GCC command line. Without this, certain toolchains may build Thumb2 code by default. Also junk sections may be present in the final binary and they need to be removed. This helps at least when using the following Linaro toolchain: gcc-linaro-5.1-2015.08-x86_64_arm-linux-gnueabihf.tar.xz Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by: Bernhard Nortmann <bernhard.nortmann@web.de>
29 lines
941 B
Plaintext
29 lines
941 B
Plaintext
/*
|
|
* Copyright (C) 2012 Henrik Nordstrom <henrik@henriknordstrom.net>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
SECTIONS
|
|
{
|
|
. = 0x0030;
|
|
.text : { *(.text) }
|
|
/DISCARD/ : { *(.dynstr*) }
|
|
/DISCARD/ : { *(.dynamic*) }
|
|
/DISCARD/ : { *(.plt*) }
|
|
/DISCARD/ : { *(.interp*) }
|
|
/DISCARD/ : { *(.gnu*) }
|
|
/DISCARD/ : { *(.note*) }
|
|
}
|