[Bug binutils/31924] aarch64 kernels built with binutils 2.42.50.20240618 and later fail to boot

2024-06-29 Thread ardb at kernel dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31924

--- Comment #12 from Ard Biesheuvel  ---
Actually, I changed my mind.

--no-apply-dynamic-relocs counters an optimization that removes the need to
process RELA entries of type R_AARCH64_RELATIVE by copying the addend into the
executable.


RELR relocations fundamentally rely on the addend being present in the
executable, as it is not stored anywhere else. This means
--no-apply-dynamic-relocs must only apply to RELA relocations, and should be
ignored for RELR relocations, as the resulting binary will always be broken
otherwise.

IOW, copying the addend into the executable is optional for RELA (and has
little value unless the relocation type is R_AARCH64_RELATIVE), but it is
required for RELR so disabling it can never make sense.

So this should be fixed in ld.bfd.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/31924] aarch64 kernels built with binutils 2.42.50.20240618 and later fail to boot

2024-06-29 Thread ardb at kernel dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31924

Ard Biesheuvel  changed:

   What|Removed |Added

 CC||maskray at google dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/31940] New: usage text for strings gives '--unicode=show' as a valid option

2024-06-29 Thread aapo.rantalainen at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31940

Bug ID: 31940
   Summary: usage text for strings gives '--unicode=show' as a
valid option
   Product: binutils
   Version: 2.43 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: aapo.rantalainen at gmail dot com
  Target Milestone: ---

binutils/strings -h | grep unicode
--unicode={default|show|invalid|hex|escape|highlight}
-U {d|s|i|x|e|h}  Specify how to treat UTF-8 encoded unicode
characters


echo | binutils/strings --unicode=show
binutils/strings: invalid argument to -U/--unicode: show

echo | binutils/strings -Us
binutils/strings: invalid argument to -U/--unicode: s



echo | binutils/strings --unicode=locale
-> no error

echo | binutils/strings -Ul
-> no error

---
Trivial patch:
diff --git a/binutils/strings.c b/binutils/strings.c
index ec02e1d5fce..5d7be3dd543 100644
--- a/binutils/strings.c
+++ b/binutils/strings.c
@@ -1350,8 +1350,8 @@ usage (FILE *stream, int status)
   -T --target= Specify the binary file format\n\
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:\n\
 s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} =
32-bit\n\
-  --unicode={default|show|invalid|hex|escape|highlight}\n\
-  -U {d|s|i|x|e|h}  Specify how to treat UTF-8 encoded unicode
characters\n\
+  --unicode={default|locale|invalid|hex|escape|highlight}\n\
+  -U {d|l|i|x|e|h}  Specify how to treat UTF-8 encoded unicode
characters\n\
   -s --output-separator= String used to separate strings in output.\n\
   @   Read options from \n\
   -h --help Display this information\n\

-- 
You are receiving this mail because:
You are on the CC list for the bug.