11 Dec, 2013

1 commit


07 Dec, 2013

1 commit

  • Current LDS files /DISCARD/ a lot of sections when linking ELF
    files, causing diagnostic tools such as readelf or objdump to
    produce partial output. Keep all section at link stage, filter
    only at objcopy time so that .bin remains minimal.

    Signed-off-by: Albert ARIBAUD
    Reviewed-by: Benoît Thébaudeau

    Albert ARIBAUD
     

18 Nov, 2013

1 commit


01 Nov, 2013

1 commit


24 Jul, 2013

1 commit


22 Jun, 2013

3 commits

  • This change is only done where needed: some linker
    scripts may contain relocation symbols yet remain
    unchanged.

    __rel_dyn_start and __rel_dyn_end each requires
    its own output section; putting them in relocation
    sections changes their flags and breaks relocation.

    Signed-off-by: Albert ARIBAUD
    Tested-by: Lubomir Popov
    Tested-by: Jeroen Hofstee
    Reviewed-by: Benoît Thébaudeau

    Albert ARIBAUD
     
  • This change is only done where needed: some linker
    scripts may contain __image_copy_{start,end} yet
    remain unchanged.

    Also, __image_copy_end needs its own section; putting
    it in relocation sections changes their flags and makes
    relocation break.

    Signed-off-by: Albert ARIBAUD
    Tested-by: Lubomir Popov
    Tested-by: Jeroen Hofstee
    Reviewed-by: Benoît Thébaudeau

    Albert ARIBAUD
     
  • Discard all .dynsym sections from linker scripts
    Remove all __dynsym_start definitions from linker scripts
    Remove all __dynsym_start references from the codebase

    Note: this touches include/asm-generic/sections.h, which
    is not ARM-specific, but actual uses of __dynsym_start
    are only in ARM, so this patch can safely go through
    the ARM repository.

    Signed-off-by: Albert ARIBAUD
    Tested-by: Lubomir Popov
    Tested-by: Jeroen Hofstee
    Reviewed-by: Benoît Thébaudeau

    Albert ARIBAUD
     

14 Apr, 2013

1 commit

  • Commit 3ebd1cbc introduced compiler-generated __bss_start
    and __bss_end__ and commit c23561e7 rewrote all __bss_end__
    as __bss_end. Their merge caused silent and harmless but
    potentially bug-inducing clashes between compiler- and linker-
    generated __bss_end symbols.

    Make __bss_end and __bss_start compiler-only, and create
    __bss_base and __bss_limit for linker-only use.

    Signed-off-by: Albert ARIBAUD
    Reported-by: Benoît Thébaudeau

    Albert ARIBAUD
     

12 Apr, 2013

1 commit

  • Use __image_copy_end instead of __bss_start for the end of the image to
    relocate. This is the same as commit 033ca72, but applied to all ARM start.S.

    This is a more appropriate symbol naming for an image copy & relocate feature,
    and this also saves a useless copy of data put between __image_copy_end and
    __bss_start in linker scripts (e.g. relocation information, or MMU
    initialization tables used only before jumping to the relocated image).

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     

19 Mar, 2013

1 commit

  • Albert's rework of the linker scripts conflicted with Simon's making
    everyone use __bss_end. We also had a minor conflict over
    README.scrapyard being added to in mainline and enhanced in
    u-boot-arm/master with proper formatting.

    Conflicts:
    arch/arm/cpu/ixp/u-boot.lds
    arch/arm/cpu/u-boot.lds
    arch/arm/lib/Makefile
    board/actux1/u-boot.lds
    board/actux2/u-boot.lds
    board/actux3/u-boot.lds
    board/dvlhost/u-boot.lds
    board/freescale/mx31ads/u-boot.lds
    doc/README.scrapyard
    include/configs/tegra-common.h

    Build tested for all of ARM and run-time tested on am335x_evm.

    Signed-off-by: Tom Rini

    Tom Rini
     

16 Mar, 2013

1 commit

  • Note this is a tree-wide change affecting multiple architectures.

    At present we use __bss_start, but mostly __bss_end__. This seems
    inconsistent and in a number of places __bss_end is used instead.

    Change to use __bss_end for the BSS end symbol throughout U-Boot. This
    makes it possible to use the asm-generic/sections.h file on all
    archs.

    Signed-off-by: Simon Glass

    Simon Glass
     

13 Mar, 2013

2 commits

  • Refactor linker-generated array code so that symbols
    which were previously linker-generated are now compiler-
    generated. This causes relocation records of type
    R_ARM_ABS32 to become R_ARM_RELATIVE, which makes
    code which uses LGA able to run before relocation as
    well as after.

    Note: this affects more than ARM targets, as linker-
    lists span possibly all target architectures, notably
    PowerPC.

    Conflicts:
    arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
    arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
    arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
    board/ait/cam_enc_4xx/u-boot-spl.lds
    board/davinci/da8xxevm/u-boot-spl-da850evm.lds
    board/davinci/da8xxevm/u-boot-spl-hawk.lds
    board/vpac270/u-boot-spl.lds

    Signed-off-by: Albert ARIBAUD

    Albert ARIBAUD
     
  • Turn __bss_start and __bss_end__ from linker-generated
    to compiler-generated symbols, causing relocations for
    these symbols to change type, from R_ARM_ABS32 to
    R_ARM_RELATIVE.

    This should have no functional impact, as it affects
    references to __bss_start and __bss_end__ only before
    relocation, and no such references are done.

    Signed-off-by: Albert ARIBAUD

    Albert ARIBAUD
     

22 Oct, 2012

2 commits

  • The command declaration now uses the new LG-array method to generate
    list of commands. Thus the __u_boot_cmd section is now superseded and
    redundant and therefore can be removed. Also, remove externed symbols
    associated with this section from include/command.h .

    Signed-off-by: Marek Vasut
    Cc: Joe Hershberger
    Cc: Mike Frysinger

    Marek Vasut
     
  • Add section for the linker-generated lists into all possible linker
    files, so that everyone can easily use these lists. This is mostly
    a mechanical adjustment.

    Signed-off-by: Marek Vasut
    Cc: Joe Hershberger
    Cc: Mike Frysinger

    Marek Vasut
     

19 Oct, 2012

1 commit


27 Mar, 2012

1 commit


16 Oct, 2011

1 commit

  • The top level Makefile does not do any recursion into subdirs when
    cleaning, so these clean/distclean targets in random arch/board dirs
    never get used. Punt them all.

    MAKEALL didn't report any errors related to this that I could see.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

23 Jun, 2011

1 commit


13 May, 2011

1 commit

  • A large number of boards incorrectly used getenv() in their board init
    code running before relocation. In some cases this caused U-Boot to
    hang when certain environment variables grew too long.
    Fix the code to use getenv_r().

    Signed-off-by: Wolfgang Denk
    Cc: Stefan Roese
    Cc: The LEOX team
    Cc: Michael Schwingen
    Cc: Georg Schardt
    Cc: Werner Pfister
    Cc: Dirk Eibach
    Cc: Peter De Schrijver
    Cc: John Zhan
    Cc: Rishi Bhattacharya
    Cc: Peter Tyser

    Wolfgang Denk
     

30 Apr, 2011

1 commit

  • Currently, some linker scripts are found by common code in config.mk.
    Some are found using CONFIG_SYS_LDSCRIPT, but the code for that is
    sometimes in arch config.mk and sometimes in board config.mk. Some
    are found using an arch-specific rule for looking in CPUDIR, etc.

    Further, the powerpc config.mk rule relied on CONFIG_NAND_SPL
    when it really wanted CONFIG_NAND_U_BOOT -- which covered up the fact
    that not all NAND_U_BOOT builds actually wanted CPUDIR/u-boot-nand.lds.

    Replace all of this -- except for a handful of boards that are actually
    selecting a linker script in a unique way -- with centralized ldscript
    finding.

    If board code specifies LDSCRIPT, that will be used.
    Otherwise, if CONFIG_SYS_LDSCRIPT is specified, that will be used.

    If neither of these are specified, then the central config.mk will
    check for the existence of the following, in order:

    $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
    $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
    $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
    $(TOPDIR)/$(CPUDIR)/u-boot.lds

    Some boards (sc3, cm5200, munices) provided their own u-boot.lds that
    were dead code, because they were overridden by a CPUDIR u-boot.lds under
    the old powerpc rules. These boards' own u-boot.lds have bitrotted and
    no longer work -- these lds files have been removed.

    Signed-off-by: Scott Wood
    Tested-by: Graeme Russ

    Scott Wood
     

28 Mar, 2011

1 commit


18 Nov, 2010

1 commit

  • Before this commit, weak symbols were not overridden by non-weak symbols
    found in archive libraries when linking with recent versions of
    binutils. As stated in the System V ABI, "the link editor does not
    extract archive members to resolve undefined weak symbols".

    This commit changes all Makefiles to use partial linking (ld -r) instead
    of creating library archives, which forces all symbols to participate in
    linking, allowing non-weak symbols to override weak symbols as intended.
    This approach is also used by Linux, from which the gmake function
    cmd_link_o_target (defined in config.mk and used in all Makefiles) is
    inspired.

    The name of each former library archive is preserved except for
    extensions which change from ".a" to ".o". This commit updates
    references accordingly where needed, in particular in some linker
    scripts.

    This commit reveals board configurations that exclude some features but
    include source files that depend these disabled features in the build,
    resulting in undefined symbols. Known such cases include:
    - disabling CMD_NET but not CMD_NFS;
    - enabling CONFIG_OF_LIBFDT but not CONFIG_QE.

    Signed-off-by: Sebastien Carlier

    Sebastien Carlier
     

19 Oct, 2010

1 commit

  • The change is currently needed to be able to remove the board
    configuration scripting from the top level Makefile and replace it by
    a simple, table driven script.

    Moving this configuration setting into the "CONFIG_*" name space is
    also desirable because it is needed if we ever should move forward to
    a Kconfig driven configuration system.

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

13 Apr, 2010

3 commits


13 Jun, 2009

1 commit


21 Mar, 2009

1 commit

  • A recent gcc added a new unaligned rodata section called '.rodata.str1.1',
    which needs to be added the the linker script. Instead of just adding this
    one section, we use a wildcard ".rodata*" to get all rodata linker section
    gcc has now and might add in the future.

    However, '*(.rodata*)' by itself will result in sub-optimal section
    ordering. The sections will be sorted by object file, which causes extra
    padding between the unaligned rodata.str.1.1 of one object file and the
    aligned rodata of the next object file. This is easy to fix by using the
    SORT_BY_ALIGNMENT command.

    This patch has not be tested one most of the boards modified. Some boards
    have a linker script that looks something like this:

    *(.text)
    . = ALIGN(16);
    *(.rodata)
    *(.rodata.str1.4)
    *(.eh_frame)

    I change this to:

    *(.text)
    . = ALIGN(16);
    *(.eh_frame)
    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))

    This means the start of rodata will no longer be 16 bytes aligned.
    However, the boundary between text and rodata/eh_frame is still aligned to
    16 bytes, which is what I think the real purpose of the ALIGN call is.

    Signed-off-by: Trent Piepho

    Trent Piepho
     

19 Nov, 2008

1 commit

  • Most of the bss initialization loop increments 4 bytes
    at a time. And the loop end is checked for an 'equal'
    condition. Make the bss end address aligned by 4, so
    that the loop will end as expected.

    Signed-off-by: Selvamuthukumar
    Signed-off-by: Wolfgang Denk

    Selvamuthukumar
     

19 Oct, 2008

1 commit


11 Sep, 2008

1 commit


03 Jul, 2008

1 commit


03 Mar, 2008

1 commit

  • - actua1:
    actux1.c: In function 'checkboard':
    actux1.c:92: warning: unused variable 'revision'

    - actua2:
    actux2.c: In function 'checkboard':
    actux2.c:100: warning: unused variable 's'
    actux2.c:99: warning: unused variable 'revision'
    actux2.c: In function 'reset_phy':
    actux2.c:130: warning: unused variable 'i'

    - actua3:
    actux3.c: In function 'checkboard':
    actux3.c:114: warning: unused variable 'revision'

    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD

    Jean-Christophe PLAGNIOL-VILLARD
     

18 Jan, 2008

1 commit