mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 00:47:26 +00:00
d1f81fd015
In style of linked lists, instead of declaring symbols for boundaries of getopt options array in the linker script, declare corresponding sections and retrieve the boundaries via static inline functions. Without this clang's LTO produces binary without any getopt options, because for some reason it thinks that array is empty (start and end symbols are at the same address). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
31 lines
624 B
Text
31 lines
624 B
Text
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (c) 2011-2012 The Chromium OS Authors.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
SECTIONS
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
.u_boot_list : {
|
|
KEEP(*(SORT(.u_boot_list*)));
|
|
}
|
|
|
|
/* Private data for devices with OF_PLATDATA_RT */
|
|
. = ALIGN(4);
|
|
.priv_data : {
|
|
__priv_data_start = .;
|
|
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.priv_data*)))
|
|
__priv_data_end = .;
|
|
}
|
|
|
|
_u_boot_sandbox_getopt : {
|
|
*(.u_boot_sandbox_getopt_start)
|
|
KEEP(*(.u_boot_sandbox_getopt))
|
|
*(.u_boot_sandbox_getopt_end)
|
|
}
|
|
}
|
|
|
|
INSERT AFTER .data;
|