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

Re: [PATCH v2 2/2] tools/firmware: do not add a .note.gnu.property section


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Mon, 4 Apr 2022 12:19:01 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 04 Apr 2022 11:19:15 +0000
  • Ironport-data: A9a23:6cQyVq0NIxXSaUiN2/bD5f5xkn2cJEfYwER7XKvMYLTBsI5bp2BWm GYZDT2BO/veZmrzLYtyOoTk/EtTuJHdzYdgHlZqpC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkjk7xdOCn9xGQ7InQLlbGILes1htZGEk1EE/NtTo5w7Rj2tIw3YDga++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1Sh43haj93DJT2xvklThR1HAdHHa5vreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHiOp8fvXdxiynUF/88TbjIQrnQ5M8e1zA17ixLNaiOP JFHMGc2BPjGSwduCm8vUpQlp/+lq1zCUgNxpVa19YNitgA/yyQuieOwYbI5YOeiXt5Jl0yVo mbH+WXRARwAMtGbjz2f/RqEmevnjS79HoUIG9WQ9ONugVCV7nweDlsRT1TTiem0jAuyVsxSL 2QQ+zEytu4i+UqzVN7/Uhak5nmesXY0WdBdDuk74wGl0bfP7kCSAW1sc9JaQIV47olsH2Vsj wLX2YOybdByjFGLYW2v5+a3lW2AABJLMFcfaAILazIl4PC29enfkSnzZtpkFae0iPj8Fjfx3 y2GoUACulkDsSIY//7lpA6a2lpAsrCMF1dovVuPAgpJ+ysjPOaYi5qUBU83BBqqBKKQVRG/s XcNgKByB8heXMjWxERhrAjgdYxFBspp0hWB2jaD/LF7rlxBHkJPm6gKvVmSw28zb645lcfBO hO7hO+ozMY70IGWRaF2eZmtLM8h0LLtE9/oPtiNMIYfOsIpKFLbp30yDaJ144wLuBJx+U3YE c3FGftA8F5AUfg3pNZIb7l1PUAXKtAWmjqIGMGTI+WP2ruCfn+FIYrpw3PVBt3VGJis+V2Pm /4GbpPi40wGDIXWP3mGmaZOfAtiBSVqWvjLRzl/K7frzvxOQzp6VZc8ANoJJuRYokiivryTo SHlAx8BlwKXaL+uAVziV02PoYjHBf5XxU/X9wR1Vbp08xDPubqS0Zo=
  • Ironport-hdrordr: A9a23:KS/DOaEXwJ+XcBkipLqE0MeALOsnbusQ8zAXP0AYc31om+ij5q eTdZMgpHnJYVcqKRUdcL+7VJVoLUmyyXcx2/hpAV7AZniChILLFvAA0WKK+VSJcEeSygce79 YDT0EXMqyJMbEQt6bHCWeDfeod/A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Apr 04, 2022 at 12:12:54PM +0100, Anthony PERARD wrote:
> On Mon, Apr 04, 2022 at 12:40:44PM +0200, Roger Pau Monne wrote:
> > Prevent the assembler from creating a .note.gnu.property section on
> > the output objects, as it's not useful for firmware related binaries,
> > and breaks the resulting rombios image.
> > 
> > This requires modifying the cc-option Makefile macro so it can test
> > assembler options (by replacing the usage of the -S flag with -c) and
> > also stripping the -Wa, prefix if present when checking for the test
> > output.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > ---
> > Changes since v1:
> >  - Add the option to CFLAGS.
> > ---
> >  Config.mk               | 2 +-
> >  tools/firmware/Rules.mk | 4 ++++
> >  2 files changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Config.mk b/Config.mk
> > index f56f7dc334..82832945e5 100644
> > --- a/Config.mk
> > +++ b/Config.mk
> > @@ -91,7 +91,7 @@ PYTHON_PREFIX_ARG ?= --prefix="$(prefix)"
> >  #
> >  # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
> >  cc-option = $(shell if test -z "`echo 'void*p=1;' | \
> > -              $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
> > +              $(1) $(2) -c -o /dev/null -x c - 2>&1 | grep -- 
> > $(2:-Wa$(comma)%=%) -`"; \
> >                then echo "$(2)"; else echo "$(3)"; fi ;)
> 
> Hopefully, changing "-S" to "-c" in this macro will not break anything.
> I would be of the opinion to create a new macro which deal with
> assembler options. But if that works and doesn't changes CFLAGS in the
> testing we do in GitLab, I guess that would be OK.

It looks like Linux already use "-c" for this macro, and with "-Wa,"
options. They just don't use grep. So asking CC to do more work here is
probably fine (adding compile stage).

Cheers,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.