[Bug gas/29447] New: when gas/read.c calls mbstowcs with a NULL destination, it should set size to 0

2022-08-04 Thread nicolas at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29447

Bug ID: 29447
   Summary: when gas/read.c calls mbstowcs with a NULL
destination, it should set size to 0
   Product: binutils
   Version: 2.39
Status: NEW
  Severity: minor
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: nicolas at debian dot org
  Target Milestone: ---

Hello.

As described in bug 29265, glibc should not report an error when mbstowcs is
called with a NULL destination buffer and a non-zero size. Strictly speaking,
this alert is a false positive because the documentation for mbstowcs
explicitly mentions that the size argument is ignored when the buffer is NULL.  

However, in the specific case of binutils/gas/read.c:1670, a value of 0 would
be more readable.  The current version strongly suggests that the 'len'
variable is relevant.

--- src/gas/read.c
+++ src/gas/read.c
@@ -1667,7 +1667,7 @@
   /* Since quoted symbol names can contain non-ASCII characters,
 check the string and warn if it cannot be recognised by the
 current character set.  */   
-  if (mbstowcs (NULL, name, len) == (size_t) -1)
+  if (mbstowcs (NULL, name, 0) == (size_t) -1)
as_warn (_("symbol name not recognised in the current locale"));
 }
   else if (is_name_beginner (c) || (input_from_string && c == FAKE_LABEL_CHAR)

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


[Bug binutils/29389] pe renaming implib breaks bfd/cache.c reopening of closed archives

2022-08-04 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29389

--- Comment #32 from Nick Clifton  ---
(In reply to Luca Bacci from comment #30)

> Is it safe to backport this patch to the 2_39 branch? Let me know, otherwise
> we can simply add a downstream patch in MSYS2.

I would prefer to leave the patch just on the mainline (and hence appearing in
the 2.40 release).   We are so close to the 2.39 release date now, that I would
prefer not to rock the boat...

Cheers
  Nick

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


[Bug binutils/29389] pe renaming implib breaks bfd/cache.c reopening of closed archives

2022-08-04 Thread luca.bacci at outlook dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29389

--- Comment #33 from Luca Bacci  ---
Alright, we already have a PR in MSYS2:
https://github.com/msys2/MINGW-packages/pull/12426

Cheers!
Luca

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


[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE

2022-08-04 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22269

Alan Modra  changed:

   What|Removed |Added

 Target|aarch64, tilepro,ppc|am33,arc,bfin,frv,hppa64,ia
   ||64,m32r,m68k,metag,nds32,or
   ||1k,s390,tilepro

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


[Bug ld/29448] New: aarch64: "has a LOAD segment with RWX permissions"

2022-08-04 Thread jerome.forissier at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29448

Bug ID: 29448
   Summary: aarch64: "has a LOAD segment with RWX permissions"
   Product: binutils
   Version: 2.39
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: jerome.forissier at linaro dot org
  Target Milestone: ---

ld.bfd is producing the following warning:

aarch64-linux-gnu-ld.bfd: warning: out/arm-plat-vexpress/core/tee.elf has a
LOAD segment with RWX permissions

tee.elf is produced with a custom linker script. Full details on how to
reproduce may be found at
https://github.com/OP-TEE/optee_os/issues/5471#issuecomment-1205362895, but in
a nutshell this seems related to #21252.

Previously, no warning was output. Now that the linker warns by default, it
causes build errors with --fatal-warnings (obviously) which is a bit annoying.

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


[Bug ld/29448] aarch64: "has a LOAD segment with RWX permissions"

2022-08-04 Thread rfhn.fhbrrjnzeneqpf at noclue dot notk.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29448

Dominique Martinet  changed:

   What|Removed |Added

 CC||rfhn.fhbrrjnzeneqpf@noclue.
   ||notk.org

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