From: Forest Crossman <cyrozap@gmail.com>
To: C.Emde@osadl.org, corbet@lwn.net
Cc: Forest Crossman <cyrozap@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] tools/edid: Only include the .data section in the raw binary output
Date: Tue, 3 May 2022 19:24:43 -0500 [thread overview]
Message-ID: <20220504002444.114011-1-cyrozap@gmail.com> (raw)
I don't know at what point this changed, but with gcc 11.2.0 and
binutils 2.38, if we don't restrict what sections are output to the raw
binary, the ".note.gnu.property" section in the object file will be
written into the first 48 bytes of the EDID, rendering it unusable.
To fix this, limit the binary output to the ".data" section.
Signed-off-by: Forest Crossman <cyrozap@gmail.com>
---
tools/edid/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/edid/Makefile b/tools/edid/Makefile
index 85a927dfab02..b62bfd925348 100644
--- a/tools/edid/Makefile
+++ b/tools/edid/Makefile
@@ -16,7 +16,7 @@ clean:
@cc -c $^
%.bin.nocrc: %.o
- @objcopy -Obinary $^ $@
+ @objcopy -j.data -Obinary $^ $@
%.crc: %.bin.nocrc
@list=$$(for i in `seq 1 127`; do head -c$$i $^ | tail -c1 \
@@ -27,10 +27,10 @@ clean:
@cc -c -DCRC="$$(cat $*.crc)" -o $@ $*.S
%.bin: %.p
- @objcopy -Obinary $^ $@
+ @objcopy -j.data -Obinary $^ $@
%.bin.ihex: %.p
- @objcopy -Oihex $^ $@
+ @objcopy -j.data -Oihex $^ $@
@dos2unix $@ 2>/dev/null
%.c: %.bin
--
2.36.0
reply other threads:[~2022-05-04 0:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220504002444.114011-1-cyrozap@gmail.com \
--to=cyrozap@gmail.com \
--cc=C.Emde@osadl.org \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®