u-boot-brain/arch
Alexey Brodkin d53b128df4 arc: Fix final linkage with Elf32 tools
ARC Elf32 tools by default enable usage of so-called "small data"
section or in ARC PRM parlance "GP-relative addressing".

The idea is to put up to 2kB of frequently used data into a separate
location and use indirect addressing via dedicated core register (GP).
Where GP is used as a base for offset calculation.

And so if "-msdata" toggle is passed to the compiler either explicitly
or implicitly (that's Elf32 tools case) it will try to put some data
in that "small data" area and then to calculate real offset from GP
to be encoded in instructions we need to know the base value which
liker gets from __SDATA_BEGIN__ symbol in hte linker script.

In U-Boot we don't use that feature and linker script doesn't define
__SDATA_BEGIN__ which gives us the following linkage error if we use
Elf32 tools:
------------------------->8-------------------
  LD      u-boot
.../bin/arc-elf32-ld.bfd: Error: Linker symbol __SDATA_BEGIN__ not found
.../bin/arc-elf32-ld.bfd: final link failed: Bad value
------------------------->8-------------------

Note if uClibc or glibc tools are used that problem doesn't happen
because usage of "small data section" is disabled by default as not very
useful for bigger executables. Moreover GP is just another name of r26
so we're loosing 1 core register which is not used by the compiler as a
generic register with "-msdata".

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-02-15 15:44:47 +03:00
..
arc arc: Fix final linkage with Elf32 tools 2018-02-15 15:44:47 +03:00
arm arm/PSCI: support PSCI versions greater than 1.0 2018-02-14 12:14:15 -05:00
m68k Convert CONFIG_SYS_BOOT_GET_{CMDLINE, KBD} to Kconfig 2018-01-30 12:52:57 -05:00
microblaze microblaze: bootm: Fix compiler warning 2018-02-13 20:34:07 -05:00
mips Merge git://git.denx.de/u-boot-mips 2018-01-26 07:46:47 -05:00
nds32 nds32: dts: Support ftsdc010 DM. 2017-11-30 10:04:21 +08:00
nios2 nios2: 10m50: Add CPU pre-relocation in device tree 2017-11-17 10:51:24 -05:00
powerpc PowerPC: phy: enable all phylib drivers when use phylib and tsec enet 2018-02-09 08:35:59 -08:00
riscv riscv: Add Kconfig to support RISC-V 2018-01-12 08:05:12 -05:00
sandbox fix spelling of 'functions' in 2 places (was 'funtcions') 2018-02-13 23:24:22 -05:00
sh sh: Use asm-generic/io.h 2017-10-02 21:52:21 -04:00
x86 x86: quark: Fix unused warnings 2018-01-30 22:34:38 +08:00
xtensa xtensa: Use asm-generic/io.h 2017-10-02 21:52:22 -04:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig 2018-02-08 19:09:03 -05:00