[Bug ld/30359] Create Resource-Only DLL

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

Nick Clifton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #13 from Nick Clifton  ---
(In reply to Pali Rohár from comment #12)
> This new linker script works fine.

Great - then I am going to close this PR.

I really like fixes that do not involve changing anything and that will work
with older versions of the linker...

Cheers
  Nick

-- 
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-09 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16566

--- Comment #9 from Nick Clifton  ---
(In reply to jon from comment #8)
Hi Jon,

>  arm-eabi-gcc test.c -o test.exe -Xlinker -Map=arm.map -flto -Xlinker
> --print-map-locals
> 
> With the bfd_link_hash_lookup condition, func doesn't appear in the map file.

Ah - but if you remove the "-flto" option it works...

The problem is that the LTO compiler moves the func() code into its own
section,
which confuses the local printing code.  I am looking to see if I can find a
way
around this problem...

Cheers
  Nick

-- 
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-09 Thread jon at beniston dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16566

--- Comment #10 from jon at beniston dot com ---
> Ah - but if you remove the "-flto" option it works...

Without -flto, func is a global symbol.

> The problem is that the LTO compiler moves the func() code into its own 
> section,

I guess that may be target/gcc version specific. I just see it being changed
from a global to a local in .text.

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


[Bug libctf/30432] New: readelf with option --ctf=1, received signal SIGSEGV when opening testcases generated from fuzz testing

2023-05-09 Thread xing_ruopeng at bupt dot edu.cn
https://sourceware.org/bugzilla/show_bug.cgi?id=30432

Bug ID: 30432
   Summary: readelf with option --ctf=1, received signal SIGSEGV
when opening testcases generated from fuzz testing
   Product: binutils
   Version: 2.39
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: libctf
  Assignee: unassigned at sourceware dot org
  Reporter: xing_ruopeng at bupt dot edu.cn
  Target Milestone: ---

Created attachment 14868
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14868&action=edit
3 pocs generated by AFL plus plus

I tested readelf with AFL plus plus, then found this crash.

Opening testcases with readelf and option --ctf=1 can reproduce it.
There are 3 pocs in attachment. You can reproduce this crash with them.

There are outputs when I debuged with gdb:

Starting program: /home/xrp/aflpp/poc/readelf/readelf --ctf=1 ./poc1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
readelf:警告: Section 1 has an out of range sh_link value of 1415536384
readelf:警告: Section 12 has an out of range sh_link value of 2130706432
readelf:警告: Section 27 has an out of range sh_link value of 1882092655
readelf:错误: Section 27 has invalid sh_entsize of 73622e00
readelf:错误: (Using the expected size of 10 for the rest of this dump)
readelf:错误: Reading 2019634795 bytes extends past end of file for section
contents

Program received signal SIGSEGV, Segmentation fault.
0x555be58c in ctf_arc_bufopen (ctfsect=ctfsect@entry=0x7fffdbe0,
symsect=symsect@entry=0x7fffdc00, strsect=strsect@entry=0x7fffdc20,
errp=errp@entry=0x7fffdbc4) at ../../libctf/ctf-archive.c:427
427   if (ctfsect->cts_size > sizeof (uint64_t) &&
(gdb) info threads 
  Id   Target Id   Frame 
* 1Thread 0x77fa3740 (LWP 76764) "readelf" 0x555be58c in
ctf_arc_bufopen (ctfsect=ctfsect@entry=0x7fffdbe0, 
symsect=symsect@entry=0x7fffdc00, strsect=strsect@entry=0x7fffdc20,
errp=errp@entry=0x7fffdbc4) at ../../libctf/ctf-archive.c:427
(gdb) bt
#0  0x555be58c in ctf_arc_bufopen
(ctfsect=ctfsect@entry=0x7fffdbe0, symsect=symsect@entry=0x7fffdc00,
strsect=strsect@entry=0x7fffdc20, 
errp=errp@entry=0x7fffdbc4) at ../../libctf/ctf-archive.c:427
#1  0x55594533 in dump_section_as_ctf (filedata=0x556604b0,
section=0x55663b60) at ../../binutils/readelf.c:15889
#2  process_section_contents (filedata=filedata@entry=0x556604b0) at
../../binutils/readelf.c:16477
#3  0x55595a17 in process_section_contents (filedata=0x556604b0) at
../../binutils/readelf.c:6560
#4  process_object (filedata=filedata@entry=0x556604b0) at
../../binutils/readelf.c:22502
#5  0x555604e6 in process_object (filedata=0x556604b0) at
../../binutils/readelf.c:22426
#6  process_file (file_name=) at ../../binutils/readelf.c:22925
#7  main (argc=, argv=) at
../../binutils/readelf.c:22996

I guess there may be a bug or bugs located in libctf/ctf-archive.c.

Binutils 2.40 Build on Ubuntu 22.04

-- 
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-09 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16566

Nick Clifton  changed:

   What|Removed |Added

  Attachment #14853|0   |1
is obsolete||
  Attachment #14855|0   |1
is obsolete||

--- Comment #11 from Nick Clifton  ---
Created attachment 14869
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14869&action=edit
Proposed patch

OK, here is another version of the patch.  This version detects symbols in LTO
generated object files and treats them slightly differently.  It works with the
test case you gave me, and I think that it should work for all inputs, but
please do give it a try with a real program and see if it works as you want.

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


Issue 55991 in oss-fuzz: binutils:fuzz_as: Stack-overflow in snapshot_symbol

2023-05-09 Thread sheriffbot via monorail
Updates:
Labels: Deadline-Approaching

Comment #2 on issue 55991 by sheriffbot: binutils:fuzz_as: Stack-overflow in 
snapshot_symbol
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55991#c2

This bug is approaching its deadline for being fixed, and will be automatically 
derestricted within 7 days. If a fix is planned within 2 weeks after the 
deadline has passed, a grace extension can be granted.

- 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 libctf/30432] readelf with option --ctf=1, received signal SIGSEGV when opening testcases generated from fuzz testing

2023-05-09 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30432

Alan Modra  changed:

   What|Removed |Added

Version|2.39|2.40
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Alan Modra  ---
This has already been fixed on mainline.  Please only report fuzzing bugs
against binutils built from the latest git sources.

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


[Bug ld/27566] [RISC-V] relocation truncated to fit: R_RISCV_GPREL_I against aymbol

2023-05-09 Thread nelsonc1225 at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27566

Nelson Chu  changed:

   What|Removed |Added

   Last reconfirmed||2023-05-10
 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---
 Ever confirmed|0   |1

--- Comment #10 from Nelson Chu  ---
Reopend since it happens again...

-- 
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-09 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30409

--- Comment #1 from Alan Modra  ---
Both your step2 and step2b archives are truncated.  The bug report as-is
doesn't give us any easy way of reproducing a problem in ar, which means it is
unlikely to be investigated further.  If you package up the object files added
in step2 we might be able to reproduce your problem.

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


[Bug ld/30254] iostream crashes with ld linker for windows targets

2023-05-09 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30254

Alan Modra  changed:

   What|Removed |Added

   Severity|critical|normal
   Priority|P1  |P2

--- Comment #1 from Alan Modra  ---
Does this problem still occur after my patch for pr30343?

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