]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: u-boot.lds: Remove bogus __bss_start symbol
authorOvidiu Panait <ovidiu.panait@windriver.com>
Mon, 17 Aug 2020 18:27:51 +0000 (21:27 +0300)
committerSimon Glass <sjg@chromium.org>
Sat, 22 Aug 2020 14:54:51 +0000 (08:54 -0600)
The sections described in the sandbox linker script are inserted before
data section via "INSERT BEFORE .data;". Running readelf -S on sandbox
u-boot binary shows that the bss section is located after the data
section:

  Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  ...
  [25] .u_boot_list      PROGBITS         000000000041d1c8  0021d1c8
       000000000000dd90  0000000000000000  WA       0     0     8
  [26] _u_boot_sandbox_g PROGBITS         000000000042af58  0022af58
       00000000000000a0  0000000000000000  WA       0     0     8
  [27] .data             PROGBITS         000000000042b000  0022b000
       000000000000f708  0000000000000000  WA       0     0     32
  [28] .bss              NOBITS           000000000043a720  0023a708
       0000000000018930  0000000000000000  WA       0     0     32

This means that the __bss_start assignment in the linker script is bogus,
as the actual bss section start is located elsewhere. Remove this
assignment, as the __bss_start symbol is not used on sandbox anyway.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
arch/sandbox/cpu/u-boot-spl.lds
arch/sandbox/cpu/u-boot.lds

index c60eb109b151e1175808535f3d5b8216bcd717a1..649abeb5ee739e59c4c7af0c32107586ad2381d3 100644 (file)
@@ -16,8 +16,6 @@ SECTIONS
        __u_boot_sandbox_option_start = .;
        _u_boot_sandbox_getopt : { KEEP(*(.u_boot_sandbox_getopt)) }
        __u_boot_sandbox_option_end = .;
-
-       __bss_start = .;
 }
 
 INSERT AFTER .data;
index 6a26c27e8e2d1d253e50150b072f9f1e43e702d8..936da5e1402f691ae339f76cccc5724eb4f76509 100644 (file)
@@ -44,8 +44,6 @@ SECTIONS
        {
                *(.__efi_runtime_rel_stop)
        }
-
-       __bss_start = .;
 }
 
 INSERT BEFORE .data;