aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@outlook.com>2023-08-03 09:47:17 +0800
committerTom Rini <trini@konsulko.com>2023-08-09 09:21:42 -0400
commitccea96f443e2d35cf5ecc341bb14569029eb93b8 (patch)
treed5940392747a93bf244739ddc337fdec9ce98a34 /lib
parent506df9dc5881b74ca6463b89e9edcd14732a7da5 (diff)
downloadu-boot-ccea96f443e2d35cf5ecc341bb14569029eb93b8.zip
u-boot-ccea96f443e2d35cf5ecc341bb14569029eb93b8.tar.gz
u-boot-ccea96f443e2d35cf5ecc341bb14569029eb93b8.tar.bz2
treewide: unify the linker symbol reference format
Now all linker symbols are declared as type char[]. Though we can reference the address via both the array name 'var' and its address '&var'. It's better to unify them to avoid confusing developers. This patch converts all '&var' linker symbol refrences to the most commonly used format 'var'. Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/fdtdec.c6
-rw-r--r--lib/trace.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index c60972d..7a69167 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1230,12 +1230,12 @@ static void *fdt_find_separate(void)
#ifdef CONFIG_SPL_BUILD
/* FDT is at end of BSS unless it is in a different memory region */
if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS))
- fdt_blob = (ulong *)&_image_binary_end;
+ fdt_blob = (ulong *)_image_binary_end;
else
- fdt_blob = (ulong *)&__bss_end;
+ fdt_blob = (ulong *)__bss_end;
#else
/* FDT is at end of image */
- fdt_blob = (ulong *)&_end;
+ fdt_blob = (ulong *)_end;
if (_DEBUG && !fdtdec_prepare_fdt(fdt_blob)) {
int stack_ptr;
diff --git a/lib/trace.c b/lib/trace.c
index 1091a57..4874bef 100644
--- a/lib/trace.c
+++ b/lib/trace.c
@@ -51,7 +51,7 @@ static inline uintptr_t __attribute__((no_instrument_function))
uintptr_t offset = (uintptr_t)func_ptr;
#ifdef CONFIG_SANDBOX
- offset -= (uintptr_t)&_init;
+ offset -= (uintptr_t)_init;
#else
if (gd->flags & GD_FLG_RELOC)
offset -= gd->relocaddr;