All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: Fix and simplify -z noreloc-overflow" linker check in arch/x86/boot/compressed/Makefile
Date: Wed, 13 Mar 2019 01:05:36 +0900	[thread overview]
Message-ID: <CAK7LNASFcbPn2zaYTLhDMnhAQi9KRLnNT1hegXnGTdn=eiCKkw@mail.gmail.com> (raw)
In-Reply-To: <CA+icZUVsc8fjxj1KGMWCQVPnaG+_W79HQ8xky=0Qd_vY55GU2Q@mail.gmail.com>

On Tue, Mar 12, 2019 at 6:13 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> Hi Masahiro Yamada,
>
> do you have an idea how to fix this properly - as for example LLD
> hasn't this option?
> Speaking of the shell-line.
> I mean use the method "call ld-option".
>
> The below should be if $linker supports z noreloc-overflow then set
> -pie together with --no-dynamic-linker.
> AFAICS this is for x86-64-only?
>
> Is it possible to simplify and have have one single line...?


Sorry, I do not understand.

Could you clarify what you want to achieve?


Thanks.






> KBUILD_LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker)
>
> [ arch/x86/boot/compressed/Makefile ]
>
> KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE)
> # Compressed kernel should be built as PIE since it may be loaded at any
> # address by the bootloader.
> ifeq ($(CONFIG_X86_32),y)
> KBUILD_LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker)
> else
> # To build 64-bit compressed kernel as PIE, we disable relocation
> # overflow check to avoid relocation overflow error with a new linker
> # command-line option, -z noreloc-overflow.
> KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
>         && echo "-z noreloc-overflow -pie --no-dynamic-linker")
> endif
> LDFLAGS_vmlinux := -T
>
> If you need more infos let me know.
>
> Thanks.
>
> Regards,
> - Sedat -
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/411



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2019-03-12 16:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12  9:13 Fix and simplify -z noreloc-overflow" linker check in arch/x86/boot/compressed/Makefile Sedat Dilek
2019-03-12 16:05 ` Masahiro Yamada [this message]
2019-03-13  8:51   ` Sedat Dilek
2019-03-18  9:45     ` Masahiro Yamada
2019-03-18  9:49       ` Sedat Dilek
2019-03-18 11:51       ` Sedat Dilek
2019-03-19  0:53         ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNASFcbPn2zaYTLhDMnhAQi9KRLnNT1hegXnGTdn=eiCKkw@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=sedat.dilek@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.