Re: [BUG] Padding inserted by linker breaks magicvar linker array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/4/19 8:42 AM, Ahmad Fatoum wrote:
> [1]: master at time of writing is 27ee6010 "console_simple: fix linking error when
>      ARCH_HAS_CTRLC enabled". To reproduce the issue I've added a single dummy initcall.
>      I can provide defconfig if requested.

I missed mentioning that I am building for ARCH=x86 compiling as 64-bit EFI
payload with gcc (Debian 8.3.0-6) 8.3.0 Configured with:
../src/configure -v --with-pkgversion='Debian 8.3.0-6'
 --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
 --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
 --with-gcc-major-version-only --program-suffix=-8
 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
 --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
 --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
 --enable-libstdcxx-debug --enable-libstdcxx-time=yes
 --with-default-libstdcxx-abi=new --enable-gnu-unique-object
 --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie
 --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
 --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
 --enable-offload-targets=nvptx-none --without-cuda-driver
 --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
 --target=x86_64-linux-gnu

While at it, I attached the defconfig. The magicvar crash is reproducible
after applying this patch:

diff --git a/common/startup.c b/common/startup.c
index c6e119966a0d..42c83d0ccd3c 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -361,6 +361,9 @@ void __noreturn start_barebox(void)
 	}
 }
 
+static int dummy1(void) { return 0; }
+pure_initcall(dummy1);
+
 void __noreturn hang (void)
 {
 	puts ("### ERROR ### Please RESET the board ###\n");


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
CONFIG_MMU=y
CONFIG_MALLOC_SIZE=0x0
CONFIG_MALLOC_TLSF=y
CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
# CONFIG_TIMESTAMP is not set
CONFIG_BOOTM_SHOW_TYPE=y
CONFIG_BOOTM_VERBOSE=y
CONFIG_BOOTM_INITRD=y
CONFIG_BOOTM_OFTREE=y
CONFIG_BLSPEC=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_PARTITION_DISK_EFI=y
# CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE is not set
# CONFIG_PARTITION_DISK_EFI_GPT_COMPARE is not set
CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
CONFIG_POLLER=y
CONFIG_STATE=y
CONFIG_DEBUG_LL=y
CONFIG_UBSAN=y
CONFIG_UBSAN_NO_ALIGNMENT=y
CONFIG_CMD_DMESG=y
CONFIG_LONGHELP=y
CONFIG_CMD_IOMEM=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_GO=y
CONFIG_CMD_LOADB=y
CONFIG_CMD_RESET=y
CONFIG_CMD_UIMAGE=y
CONFIG_CMD_PARTITION=y
CONFIG_CMD_EXPORT=y
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_MAGICVAR=y
CONFIG_CMD_MAGICVAR_HELP=y
CONFIG_CMD_SAVEENV=y
CONFIG_CMD_FILETYPE=y
CONFIG_CMD_LN=y
CONFIG_CMD_MD5SUM=y
CONFIG_CMD_UNCOMPRESS=y
CONFIG_CMD_LET=y
CONFIG_CMD_MSLEEP=y
CONFIG_CMD_READF=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_TFTP=y
CONFIG_CMD_ECHO_E=y
CONFIG_CMD_EDIT=y
CONFIG_CMD_MENU=y
CONFIG_CMD_MENUTREE=y
CONFIG_CMD_READLINE=y
CONFIG_CMD_TIMEOUT=y
CONFIG_CMD_CRC=y
CONFIG_CMD_CRC_CMP=y
CONFIG_CMD_MM=y
CONFIG_CMD_DETECT=y
CONFIG_CMD_FLASH=y
CONFIG_CMD_POWEROFF=y
CONFIG_CMD_WD=y
CONFIG_CMD_2048=y
CONFIG_CMD_BAREBOX_UPDATE=y
CONFIG_CMD_OF_NODE=y
CONFIG_CMD_OF_PROPERTY=y
CONFIG_CMD_OFTREE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_STATE=y
CONFIG_NET=y
CONFIG_NET_NFS=y
CONFIG_NET_NETCONSOLE=y
CONFIG_DRIVER_SERIAL_EFI_STDIO=y
CONFIG_DRIVER_NET_EFI_SNP=y
# CONFIG_SPI is not set
CONFIG_DISK=y
CONFIG_FINTEK_SUPERIO=y
CONFIG_SMSC_SUPERIO=y
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_EFI=y
CONFIG_FS_EXT4=y
CONFIG_FS_TFTP=y
CONFIG_FS_NFS=y
CONFIG_FS_EFI=y
CONFIG_FS_EFIVARFS=y
CONFIG_FS_FAT=y
CONFIG_FS_FAT_WRITE=y
CONFIG_FS_FAT_LFN=y
_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux