lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 10 May 2020 10:50:05 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Mahmood Naderan <mahmood.nt@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        linux-kbuild <linux-kbuild@...r.kernel.org>
Subject: Re: Using a custom LDFLAG for all objects and binaries

On 5/10/20 10:13 AM, Mahmood Naderan wrote:
>> Have you read Documentation/kbuild/makefiles.rst ?
>>
>>     LDFLAGS
>>         Generic $(LD) options
>>
>>         Flags used for all invocations of the linker.
> 
> 
> What I see is this in Documentation/kbuild/makefiles.txt
> 
>     LDFLAGS             Generic $(LD) options
> 
>         Flags used for all invocations of the linker.
>         Often specifying the emulation is sufficient.
> 
>         Example:
>                 #arch/s390/Makefile
>                 LDFLAGS         := -m elf_s390
>         Note: ldflags-y can be used to further customise
>         the flags used. See chapter 3.7.
> 
> 
> 
> I have two questions then:
> 1- Can I use that as a bash variable? Like "LDFLAGS=--emit-relocs make"

I don't know. You could experiment with it to see.
(again by using 'make V=1' to see the commands that are being used)

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

That should work.

> Thanks for your help.

It would be better to ask these questions on the linux-kbuild mailing list
(added now).

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ