lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 10 May 2020 23:34:20 +0430
From:   Mahmood Naderan <>
To:     Randy Dunlap <>
        linux-kbuild <>
Subject: Re: Using a custom LDFLAG for all objects and binaries

> > or
> > 2- Editing arch/x86/Makefile with
> >    KBUILD_LDFLAGS := -m --emit-relocs elf_$(UTS_MACHINE)
> That should work.

Seems not... I ran the following commands:

$ cp -v /boot/config-$(uname -r) .config
$ make menuconfig  -> Exit -> Save
$ vim arch/x86/Makefile
     KBUILD_LDFLAGS := -m --emit-relocs elf_$(UTS_MACHINE)
$ make V=1

This is the error that I get

make -f ./scripts/ obj=usr need-builtin=1
/bin/bash ./usr/ -l -d > usr/.initramfs_data.cpio.d
(cat /dev/null; ) > usr/modules.order
make -f ./scripts/ obj=arch/x86 need-builtin=1
make -f ./scripts/ obj=arch/x86/crypto need-builtin=1
make -f ./scripts/ obj=arch/x86/crypto/sha1-mb need-builtin=
(cat /dev/null;   echo kernel/arch/x86/crypto/sha1-mb/sha1-mb.ko;) >
  ld -m --emit-relocs elf_x86_64     -r -o
arch/x86/crypto/sha1-mb/sha1-mb.o arch/x86/crypto/sha1-mb/sha1_mb.o
ld: unrecognised emulation mode: --emit-relocs
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu
i386linux elf_l1om elf_k1om i386pep i386pe
scripts/ recipe for target
'arch/x86/crypto/sha1-mb/sha1-mb.o' failed
make[3]: *** [arch/x86/crypto/sha1-mb/sha1-mb.o] Error 1
scripts/ recipe for target 'arch/x86/crypto/sha1-mb' failed
make[2]: *** [arch/x86/crypto/sha1-mb] Error 2
scripts/ recipe for target 'arch/x86/crypto' failed
make[1]: *** [arch/x86/crypto] Error 2
Makefile:1053: recipe for target 'arch/x86' failed
make: *** [arch/x86] Error 2


>I would like to modify the kernel makefile in a way to include
>--emit-relocs for every file that is linked during the process of
>kernel make.
>I see
>LDFLAGS_vmlinux =
>But I don't know which one is the main. Should I put that option in
>front of every LD* variable? Or it is possible to apply one variable
>for every file that is linked?
>Appreciate your help.


Powered by blists - more mailing lists