[Bug binutils/27533] New: [readelf] -P required to print debug section in dwo file

2021-03-06 Thread vries at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27533

Bug ID: 27533
   Summary: [readelf] -P required to print debug section in dwo
file
   Product: binutils
   Version: 2.37 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider this test-case:
...
$ gcc ./src/gdb/testsuite/gdb.dwarf2/fission-multi-cu*.c -gsplit-dwarf
...

With system readelf (2.35.1), I get the .debug_info section of both .dwo files:
...
$ readelf -w a.out 2>&1 | grep "Contents of the .debug_info"
Contents of the .debug_info section (loaded from a.out):
Contents of the .debug_info.dwo section (loaded from
/home/vries/gdb_versions/devel/fission-multi-cu1.dwo):
Contents of the .debug_info.dwo section (loaded from
/home/vries/gdb_versions/devel/fission-multi-cu2.dwo):
...

But with trunk, we only get:
...
$ ~/binutils/install/bin/readelf -w a.out 2>&1 | grep "Contents of the
.debug_info"
Contents of the .debug_info section (loaded from a.out):
...

So, there are new options that dictate how links are followed and what is
displayed:
...
$ ~/binutils/install/bin/readelf -h
readelf: Warning: Nothing to do.
Usage: readelf  elf-file(s)
 Display information about the contents of ELF format files
 Options are:
  -wk,--debug-dump=links
  Display the contents of sections that link to separate debuginfo files

  -P,--process-links
  Display the contents of non-debug sections in separate debuginfo files.
  (Implies -wK)

  -wK,--debug-dump=follow-links
  Follow links to separate debug info files
  (default)

  -wN,--debug-dump=no-follow-links
  Do not follow links to separate debug info files
...

>From the description, it seems to me that -wK should be the one that works. 
But that's the default already.  Specifying it explicitly doesn't work either:
...
$ ~/binutils/install/bin/readelf -w -wK a.out 2>&1 | grep "Contents of the
.debug_info"
Contents of the .debug_info section (loaded from a.out):
...

So, I don't understand what happens here, and I just try all switches at
random, until I find the one that works:
...
$ ~/binutils/install/bin/readelf -w -P a.out 2>&1 | grep "Contents of the
.debug_info"
Contents of the .debug_info section (loaded from a.out):
Contents of the .debug_info.dwo section (loaded from
/home/vries/gdb_versions/devel/fission-multi-cu1.dwo):
Contents of the .debug_info.dwo section (loaded from
/home/vries/gdb_versions/devel/fission-multi-cu2.dwo):
...

So, I need the switch that switches on printing of non-debug sections to print
the debug section .debug_info?

AFAIU, either there's something misleading in the description, or there's a bug
in the implementation.

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


[Bug binutils/27534] New: [readelf] .debug_addr reference not resolved for split dwarf

2021-03-06 Thread vries at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27534

Bug ID: 27534
   Summary: [readelf] .debug_addr reference not resolved for split
dwarf
   Product: binutils
   Version: 2.37 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider this test-case:
...
$ gcc ./src/gdb/testsuite/gdb.dwarf2/fission-multi-cu*.c -gsplit-dwarf
...

With
...
$ ~/binutils/install/bin/readelf -w -P a.out
...
we get:
...
Contents of the .debug_info.dwo section (loaded from
/home/vries/gdb_versions/devel/fission-multi-cu1.dwo):

 <1><18>: Abbrev Number: 2 (DW_TAG_subprogram)
<19>   DW_AT_name: (indexed string: 0x2): func
<20>   DW_AT_low_pc  : (addr_index: 0x0): 
...

The address for func is:
...
$ nm a.out | grep func
00400497 T func
...
which matches this entry in the .debug_addr table in a.out:
...
Contents of the .debug_addr section (loaded from a.out):

  For compilation unit at offset 0xc7:
Index   Address
0:  00400497
...

So, we could actually print:
...
<20>   DW_AT_low_pc  : (addr_index: 0x0): 0x00400497
...

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


[Bug ld/26706] pad strings in .dynstr

2021-03-06 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=26706

Fangrui Song  changed:

   What|Removed |Added

 CC||i at maskray dot me

--- Comment #1 from Fangrui Song  ---
This is a rare operation. I don't think a built-in feature is necessary.
You can additionally link an object file with an artificial long symbol name.
Since that symbol is not used, you can change its .dynstr

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


[Bug gas/27538] New: Wrong summary for alternate option at as/Invoking

2021-03-06 Thread giecrilj at stegny dot 2a.pl
https://sourceware.org/bugzilla/show_bug.cgi?id=27538

Bug ID: 27538
   Summary: Wrong summary for alternate option at as/Invoking
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: giecrilj at stegny dot 2a.pl
  Target Milestone: ---

info:/as/Invoking

ACTUAL
alternate
  -alternate enable alternate macro syntax

EXPECTED
alternate
  --alternate enable alternate macro syntax

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


[Bug gas/27538] Wrong summary for alternate option at as/Invoking

2021-03-06 Thread giecrilj at stegny dot 2a.pl
https://sourceware.org/bugzilla/show_bug.cgi?id=27538

--- Comment #1 from Christopher Yeleighton  ---
Changes like the following are required throughout:

@c man begin SYNOPSIS
@value{AS} [@option{-a}[@option{cdghlns}][@option{=}@var{file}]]
[@option{--alternate}] [@option{-D}]
 [@option{--compress-debug-sections}]  [@option{--nocompress-debug-sections}]
 [@option{--debug-prefix-map} @var{old}@option{=}@var{new}]
 [@option{--defsym} @var{sym}@option{=}@var{val}] [@option{-f}] [@option{-g}]
[@option{--gstabs}]
 [@option{--gstabs+}] [@option{--gdwarf-}@var{N}] [@option{--gdwarf-sections}]
 [@option{--gdwarf-cie-version=}@var{VERSION}]
 [@option{--help}] [@option{-I} @var{dir}] [@option{-J}]
 [@option{-K}] [@option{-L}] [@option{--listing-lhs-width=}@var{NUM}]
 [@option{--listing-lhs-width2=}@var{NUM}]
[@option{--listing-rhs-width=}@var{NUM}]
 [@option{--listing-cont-lines=}@var{NUM}] [@option{--keep-locals}]
 [@option{--no-pad-sections}]
 [@option{-o} @var{objfile}] [@option{-R}]
 [@option{--statistics}]
 [@option{-v}] [@option{-version}] [@option{--version}]
 [@option{-W}] [@option{--warn}] [@option{--fatal-warnings}] [@option{-w}]
[@option{-x}]
 [@option{-Z}] [@option{@@}@var{FILE}]
 [@option{--sectname-subst}]
[@option{--size-check=}[@option{error}|@option{warning}]]
 [@option{--elf-stt-common=}[@option{no}|@option{yes}]]
 [@option{--generate-missing-build-notes=}[@option{no}|@option{yes}]]
 [@option{--target-help}] [@var{target-options}]
 [@option{--}] [@var{files} @dots{}]

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