[Bug ld/25694] R_RISCV_TPREL_HI20 relocations cause riscv64 to add TEXTREL bit on executables

2023-05-10 Thread alice at ayaya dot dev
https://sourceware.org/bugzilla/show_bug.cgi?id=25694

alice  changed:

   What|Removed |Added

 CC||alice at ayaya dot dev

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


[Bug binutils/30237] strip fails on riscv with 'not enough room for program headers, stgnjAlO[.interp]: bad value'

2023-05-10 Thread alice at ayaya dot dev
https://sourceware.org/bugzilla/show_bug.cgi?id=30237

alice  changed:

   What|Removed |Added

 CC||alice at ayaya dot dev

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


[Bug ld/28824] relro security issues

2023-05-10 Thread alice at ayaya dot dev
https://sourceware.org/bugzilla/show_bug.cgi?id=28824

alice  changed:

   What|Removed |Added

 CC||alice at ayaya dot dev

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


Issue 57980 in oss-fuzz: binutils:fuzz_objdump_safe: Stack-overflow in debug_write_type

2023-05-10 Thread sheriffbot via monorail
Updates:
Labels: -restrict-view-commit

Comment #3 on issue 57980 by sheriffbot: binutils:fuzz_objdump_safe: 
Stack-overflow in debug_write_type
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=57980#c3

This bug has been fixed. It has been opened to the public.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

[Bug ld/30359] Create Resource-Only DLL

2023-05-10 Thread pali at kernel dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30359

--- Comment #14 from Pali Rohár  ---
Well, if this is the way how it should be used then "fixed" linker script
should be distributed with linker. Or at least described in the LD
documentation. Because it is really hard to find some information or figure out
how to use it. Bugzilla is not really a good place for documentation.

And what about other bugs discovered in this bug report? There is a problem in
LD that it can generate section to zero VMA address.

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


[Bug ld/30390] Allow to specify custom stub for PE binaries

2023-05-10 Thread pali at kernel dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30390

--- Comment #2 from Pali Rohár  ---
Stub is executable code, I think it can be any valid binary in MZ format.
Restrictions about alignement or size would come from the MZ format itself.

About objcopy, I do not know about any way how to replace stub binary from
existing PE binary. I think that replacement is harder operation because
absolute offsets in PE structures needs to be adjusted when stub changes it
size.

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


[Bug binutils/30376] windres cannot parse rc files which it itself generated

2023-05-10 Thread pali at kernel dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30376

--- Comment #2 from Pali Rohár  ---
I'm not sure if I can upload that generated file here due to possible legal
problems.

But if you agree, you can download some other shell32.dll from the internet.
For example I found different version on
https://www.dll-files.com/shell32.dll.html (6.0.2900.6072 /
98f2e089891cae87147f74948f694565) for which GNU windres generates shell32.rc
file with same syntax errors.

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


[Bug gprofng/30439] [display html] Assertion error in caller-callee structure creation

2023-05-10 Thread ruud.vanderpas at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30439

Ruud van der Pas  changed:

   What|Removed |Added

   Assignee|vladimir.mezentsev at oracle dot c |ruud.vanderpas at 
oracle dot com
   |om  |
 Status|NEW |ASSIGNED
 CC||ruud.vanderpas at oracle dot 
com

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


[Bug gprofng/30439] New: [display html] Assertion error in caller-callee structure creation

2023-05-10 Thread ruud.vanderpas at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30439

Bug ID: 30439
   Summary: [display html] Assertion error in caller-callee
structure creation
   Product: binutils
   Version: 2.40
Status: NEW
  Severity: normal
  Priority: P2
 Component: gprofng
  Assignee: vladimir.mezentsev at oracle dot com
  Reporter: ruud.vanderpas at oracle dot com
  Target Milestone: ---

Execution terminates with the following error:

[Assertion error] generate_caller_callee - 6 elements in name exceeds
limit

What happens is that a line with the information for a specific function has
additional fields that are not expected. This is the line triggering the
problem:

5:0x0002bc0d  *@0x2bc0d () --  no functions found
0.

The string "--  no functions found" is not expected and this results in the
assertion.

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


[Bug gprofng/30438] [display html] Assertion error in function structure creation

2023-05-10 Thread ruud.vanderpas at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30438

Ruud van der Pas  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

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


[Bug gprofng/30438] [display html] Assertion error in function structure creation

2023-05-10 Thread ruud.vanderpas at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30438

Ruud van der Pas  changed:

   What|Removed |Added

 CC||ruud.vanderpas at oracle dot 
com
   Assignee|vladimir.mezentsev at oracle dot c |ruud.vanderpas at 
oracle dot com
   |om  |

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


[Bug gprofng/30438] New: [display html] Assertion error in function structure creation

2023-05-10 Thread ruud.vanderpas at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30438

Bug ID: 30438
   Summary: [display html] Assertion error in function structure
creation
   Product: binutils
   Version: 2.40
Status: NEW
  Severity: normal
  Priority: P2
 Component: gprofng
  Assignee: vladimir.mezentsev at oracle dot com
  Reporter: ruud.vanderpas at oracle dot com
  Target Milestone: ---

For a specific experiment directory, the following error is reported by
"gprofng display html":

[Assertion error] get_function_info  - unexpected: number of fields
= 10

This error indicates that the input data is not as expected, resulting in an
assertion error. As a result, the execution terminates prematurely.

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


[Bug ld/30437] aarch64: RELA relocations don't ignore section content as they should

2023-05-10 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30437

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

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


[Bug binutils/30376] windres cannot parse rc files which it itself generated

2023-05-10 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30376

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2023-05-10
   Assignee|unassigned at sourceware dot org   |nickc at redhat dot com

--- Comment #1 from Nick Clifton  ---
Hi Pali,

  Please could you upload the shell32.rc file created in your first step ?

Cheers
  Nick

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


[Bug ld/30390] Allow to specify custom stub for PE binaries

2023-05-10 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30390

Nick Clifton  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |nickc at redhat dot com
   Last reconfirmed||2023-05-10
 CC||nickc at redhat dot com
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED

--- Comment #1 from Nick Clifton  ---
Hi Pali,

  What does this stub look like ?

  Is it executable code ?

  Are there restrictions on how big it can be, the alignment it needs and so on
?

  Would it be possible to use objcopy to replace the stub generated by the
linker with one supplied by the user ?

Cheers
  Nick

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


[Bug ld/30437] aarch64: RELA relocations don't ignore section content as they should

2023-05-10 Thread matz at suse dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=30437

--- Comment #2 from Michael Matz  ---
ld.gold gets the testcase correct:

% ld.gold -pie rela.o
% objdump -sRj .data a.out 

a.out: file format elf64-littleaarch64

DYNAMIC RELOCATION RECORDS
OFFSET   TYPE  VALUE
0002 R_AARCH64_RELATIVE  *ABS*+0x00020032
00020008 R_AARCH64_RELATIVE  *ABS*+0x00020054


Contents of section .data:
 2 32000200  54000200   2...T...

The patch does the same for ld.bfd.

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


[Bug ld/30437] aarch64: RELA relocations don't ignore section content as they should

2023-05-10 Thread matz at suse dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=30437

Michael Matz  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |matz at suse dot de
 Status|NEW |ASSIGNED

--- Comment #1 from Michael Matz  ---
Created attachment 14872
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14872=edit
patch for the problem

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


[Bug ld/30437] New: aarch64: RELA relocations don't ignore section content as they should

2023-05-10 Thread matz at suse dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=30437

Bug ID: 30437
   Summary: aarch64: RELA relocations don't ignore section content
as they should
   Product: binutils
   Version: 2.41 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: matz at suse dot de
  Target Milestone: ---

The aarch64 psABI prescribes that all RELA relocs are to be idempotent. 
Amongst
other things that means they have to ignore pre-existing section content of the
to-be-relocated place.  The golang toolchain runs into this issue by failing
the
testGCData testcase as in https://github.com/golang/go/issues/39927 .  Parts of
this failing testcase were already fixed in the past, this is the remaining
piece
to be able to not force usage of gold in golang on aarch64 (see
https://github.com/golang/go/issues/22040#issuecomment-1430110400 ).

Creating a testcase by using only gas and ld.bfd requires the .reloc directives
as otherwise the relocated places are always left zeroed and hence don't
exhibit the problem.  But the a testcase is, for instance:

% cat rela.s
   .text
   .global _start
_start:
   ret

   .data
   .p2align 4
l: .long   0x, 0x
q: .quad   0x

   .reloc l, BFD_RELOC_64, q+42
   .reloc q, BFD_RELOC_64, l+84

% as rela.s -o rela.o
% ld -pie rela.o
% objdump -dRj .data a.out
a.out: file format elf64-littleaarch64

DYNAMIC RELOCATION RECORDS
OFFSET   TYPE  VALUE
0002 R_AARCH64_RELATIVE  *ABS*+0x00020032
00020008 R_AARCH64_RELATIVE  *ABS*+0x00020054


Contents of section .data:
 2 43111311  87333533   C....353

Here it's obvious that address and addend are merely added to the existing
section content.  That's the bug.

The problem is that since inceptions of the aarch64 backend the src_mask
of all relocation descriptors in BFD were non-zero.  That's always wrong
for RELA relocs.  I have a patch.

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


[Bug ld/30422] or1k relocation truncated to fit: R_OR1K_GOT16 even when using -mcmodel=large

2023-05-10 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30422

Nick Clifton  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 CC||nickc at redhat dot com
 Status|UNCONFIRMED |RESOLVED

--- Comment #2 from Nick Clifton  ---
Hi Luca,

  Thanks for the bug report and patch.  It seems like a nice elegant solution,
so I have gone ahead and applied your patch.

Cheers
  Nick

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


[Bug ld/30422] or1k relocation truncated to fit: R_OR1K_GOT16 even when using -mcmodel=large

2023-05-10 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=30422

--- Comment #1 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8b7b3b2bf4357781439e5434c4a5942ea29e983d

commit 8b7b3b2bf4357781439e5434c4a5942ea29e983d
Author: Luca Bonissi 
Date:   Wed May 10 12:08:28 2023 +0100

or1k relocation truncated to fit: R_OR1K_GOT16 even when using
-mcmodel=large

  PR 30422
  * elf32-or1k.c (or1k_elf_relocate_section): Prescan for R_OR1K_GOT_AHI16
relocs as they may occur after R_OR1K_GOT16 relocs.

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


[Bug binutils/30409] mingw ar broken since binutils 2.33

2023-05-10 Thread daniel.f.starke at freenet dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=30409

--- Comment #2 from Daniel Starke  ---
Created attachment 14871
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14871=edit
input files for step2

Please find in libkernel32-input.tgz the input files for step 2 and let me know
if/how I can help to solve this issue.

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


[Bug ld/16566] Please provide a way to include static symbols in linker map file

2023-05-10 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16566

Nick Clifton  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #14 from Nick Clifton  ---
Patch applied.  (With a couple of mistakes corrected).

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


[Bug ld/16566] Please provide a way to include static symbols in linker map file

2023-05-10 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=16566

--- Comment #13 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=496917ce466c703c1ae3bf1cbbe753de1c091445

commit 496917ce466c703c1ae3bf1cbbe753de1c091445
Author: Nick Clifton 
Date:   Wed May 10 10:29:52 2023 +0100

Add linker option to include local symbols in  the linker map.

  PR 16566
  * ldlang.c (ld_is_local_symbol): New function. (print_input_section): Add
code to display local symbols in the section.
  * ldlex.h (enum option_values): Add OPTION_PRINT_MAP_LOCALS and
OPTION_PRINT_MAP_LOCALS.
  * lexsup.c (ld_options[]): Add entries for --print-map-locals and
--no-print-map-locals.
  * NEWS: Mention the new feature.
  * ld.h (struct ld_config_type): Add print_map_locals field.
  * ld.texi: Document the new command line option.
  * testsuite/ld-scripts/sizeof.s: Add a local symbol.
  * testsuite/ld-scripts/map-locals.d: New test control file.
  * testsuite/ld-scripts/map-address.exp: Run the new test.

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


[Bug ld/16566] Please provide a way to include static symbols in linker map file

2023-05-10 Thread jon at beniston dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16566

--- Comment #12 from jon at beniston dot com ---
Looks good, thanks Nick.

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