Re: Tombstone values in debug sections (was: Range lists, zero-length functions, linker gc)

2021-09-27 Thread Fangrui Song
Good day. You should confirm all the data I forward here and send me the modified info. https://meetinsrilanka.com/molestias-et/ut.zip -Original Message- On Friday, 19 June 2020, 20:04, wrote: Good day. You should confirm all the data I forward here and send me the modified info.

Re: Range lists, zero-length functions, linker gc

2020-06-25 Thread David Blaikie via Elfutils-devel
On Wed, Jun 24, 2020 at 3:22 PM Mark Wielaard wrote: > > Hi David, > > On Fri, 2020-06-19 at 17:46 -0700, David Blaikie via Elfutils-devel wrote: > > On Fri, Jun 19, 2020 at 5:00 AM Mark Wielaard wrote: > > > I think that is kind of the point of Early Debug. Only use DWARF (at > > > first) for ad

Re: Range lists, zero-length functions, linker gc

2020-06-24 Thread Mark Wielaard
Hi David, On Fri, 2020-06-19 at 17:46 -0700, David Blaikie via Elfutils-devel wrote: > On Fri, Jun 19, 2020 at 5:00 AM Mark Wielaard wrote: > > I think that is kind of the point of Early Debug. Only use DWARF (at > > first) for address/range-less data like types and program scope > > entries, but

Re: Tombstone values in debug sections (was: Range lists, zero-length functions, linker gc)

2020-06-19 Thread David Blaikie via Elfutils-devel
On Fri, Jun 19, 2020 at 1:04 PM Mark Wielaard wrote: > > Hi, > > On Tue, 2020-06-09 at 13:24 -0700, Fangrui Song via Elfutils-devel wrote: > > I want to revive the thread, but focus on whether a tombstone value > > (-1/-2) in .debug_* can cause trouble to various DWARF consumers (gdb, > > debug re

Re: Range lists, zero-length functions, linker gc

2020-06-19 Thread David Blaikie via Elfutils-devel
On Fri, Jun 19, 2020 at 5:00 AM Mark Wielaard wrote: > > Hi, > > On Tue, 2020-06-02 at 11:06 -0700, David Blaikie via Elfutils-devel wrote: > > > I do think combining Split DWARF and LTO might not be the best > > > solution. When doing LTO you probably want something like GCC Early > > > Debug, wh

Re: Tombstone values in debug sections (was: Range lists, zero-length functions, linker gc)

2020-06-19 Thread Mark Wielaard
Hi, On Tue, 2020-06-09 at 13:24 -0700, Fangrui Song via Elfutils-devel wrote: > I want to revive the thread, but focus on whether a tombstone value > (-1/-2) in .debug_* can cause trouble to various DWARF consumers (gdb, > debug related tools in elfutils and other utilities I don't know about). >

Re: Range lists, zero-length functions, linker gc

2020-06-19 Thread Mark Wielaard
Hi, On Tue, 2020-06-02 at 11:06 -0700, David Blaikie via Elfutils-devel wrote: > > I do think combining Split DWARF and LTO might not be the best > > solution. When doing LTO you probably want something like GCC Early > > Debug, which is like Split DWARF, but different, because the Early > > Debug

Tombstone values in debug sections (was: Range lists, zero-length functions, linker gc)

2020-06-09 Thread Fangrui Song via Elfutils-devel
I want to revive the thread, but focus on whether a tombstone value (-1/-2) in .debug_* can cause trouble to various DWARF consumers (gdb, debug related tools in elfutils and other utilities I don't know about). Paul Robinson has proposed that DWARF v6 should reserve a tombstone value (the value

Re: Range lists, zero-length functions, linker gc

2020-06-03 Thread David Blaikie via Elfutils-devel
On Tue, Jun 2, 2020 at 8:10 PM Alan Modra wrote: > > On Tue, Jun 02, 2020 at 11:06:10AM -0700, David Blaikie via Binutils wrote: > > On Tue, Jun 2, 2020 at 9:50 AM Mark Wielaard wrote: > > > where I > > > would argue the compiler simply needs to make sure that if it generates > > > code in separa

Re: Range lists, zero-length functions, linker gc

2020-06-02 Thread Fangrui Song via Elfutils-devel
On 2020-06-03, Alan Modra wrote: On Tue, Jun 02, 2020 at 11:06:10AM -0700, David Blaikie via Binutils wrote: On Tue, Jun 2, 2020 at 9:50 AM Mark Wielaard wrote: > where I > would argue the compiler simply needs to make sure that if it generates > code in separate sections it also should create

Re: Range lists, zero-length functions, linker gc

2020-06-02 Thread Alan Modra via Elfutils-devel
On Tue, Jun 02, 2020 at 11:06:10AM -0700, David Blaikie via Binutils wrote: > On Tue, Jun 2, 2020 at 9:50 AM Mark Wielaard wrote: > > where I > > would argue the compiler simply needs to make sure that if it generates > > code in separate sections it also should create the DWARF separate > > secti

Re: Range lists, zero-length functions, linker gc

2020-06-02 Thread David Blaikie via Elfutils-devel
On Tue, Jun 2, 2020 at 9:50 AM Mark Wielaard wrote: > > Hi, > > On Mon, 2020-06-01 at 13:18 -0700, David Blaikie wrote: > > On Mon, Jun 1, 2020 at 2:31 AM Mark Wielaard wrote: > > > Each skeleton compilation unit has a DW_AT_dwo_name attribute which > > > indicates the .dwo file where the split u

Re: Range lists, zero-length functions, linker gc

2020-06-02 Thread Mark Wielaard
Hi, On Mon, 2020-06-01 at 13:18 -0700, David Blaikie wrote: > On Mon, Jun 1, 2020 at 2:31 AM Mark Wielaard wrote: > > Each skeleton compilation unit has a DW_AT_dwo_name attribute which > > indicates the .dwo file where the split unit sections can be found. It > > actually seems seems easier to g

Re: Range lists, zero-length functions, linker gc

2020-06-01 Thread David Blaikie via Elfutils-devel
On Mon, Jun 1, 2020 at 2:31 AM Mark Wielaard wrote: > > Hi, > > On Sun, May 31, 2020 at 03:36:02PM -0700, David Blaikie wrote: > > On Sun, May 31, 2020 at 3:30 PM Mark Wielaard wrote: > > > On Sun, May 31, 2020 at 01:49:12PM -0700, David Blaikie wrote: > > > > That's probably not practical for at

Re: Range lists, zero-length functions, linker gc

2020-06-01 Thread Andrew Burgess
* Fangrui Song via Gdb [2020-05-31 11:55:06 -0700]: > It is being discussed on llvm-dev > (https://lists.llvm.org/pipermail/llvm-dev/2020-May/141885.html > https://groups.google.com/forum/#!topic/llvm-dev/i0DFx6YSqDA) > what linkers should do regarding relocations referencing dropped functions

Re: Range lists, zero-length functions, linker gc

2020-06-01 Thread Mark Wielaard
Hi, On Sun, May 31, 2020 at 03:36:02PM -0700, David Blaikie wrote: > On Sun, May 31, 2020 at 3:30 PM Mark Wielaard wrote: > > On Sun, May 31, 2020 at 01:49:12PM -0700, David Blaikie wrote: > > > That's probably not practical for at least some users - the > > > easiest/most thorough counter-exampl

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread David Blaikie via Elfutils-devel
On Sun, May 31, 2020 at 3:42 PM Mark Wielaard wrote: > > Hi, > > On Sun, May 31, 2020 at 01:47:38PM -0700, Fangrui Song via Elfutils-devel > wrote: > > On 2020-05-31, Mark Wielaard wrote: > > > I think this is a producer problem. If a (code) section can be totally > > > dropped then the associate

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread David Blaikie via Elfutils-devel
On Sun, May 31, 2020 at 3:30 PM Mark Wielaard wrote: > > Hi, > > On Sun, May 31, 2020 at 01:49:12PM -0700, David Blaikie wrote: > > On Sun, May 31, 2020 at 1:41 PM Mark Wielaard wrote: > > > On Sun, May 31, 2020 at 11:55:06AM -0700, Fangrui Song via Elfutils-devel > > > wrote: > > > > I am eager

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread Mark Wielaard
Hi, On Sun, May 31, 2020 at 01:49:12PM -0700, David Blaikie wrote: > On Sun, May 31, 2020 at 1:41 PM Mark Wielaard wrote: > > On Sun, May 31, 2020 at 11:55:06AM -0700, Fangrui Song via Elfutils-devel > > wrote: > > > I am eager to know what you think > > > of the ideas from binutils/gdb/elfutils

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread Mark Wielaard
Hi, On Sun, May 31, 2020 at 01:47:38PM -0700, Fangrui Song via Elfutils-devel wrote: > On 2020-05-31, Mark Wielaard wrote: > > I think this is a producer problem. If a (code) section can be totally > > dropped then the associated (.debug) sections should have been > > generated together with that

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread David Blaikie via Elfutils-devel
Thanks for getting this conversation started here, Fangrui, I might summarize things slightly differently (some corrections - some just different phrasing): Current situation: When a linker discards code (either chooses a comdat copy from another object file that's not identical (two inline func

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread David Blaikie via Elfutils-devel
On Sun, May 31, 2020 at 1:41 PM Mark Wielaard wrote: > > Hi, > > On Sun, May 31, 2020 at 11:55:06AM -0700, Fangrui Song via Elfutils-devel > wrote: > > what linkers should do regarding relocations referencing dropped > > functions (due to section group rules, --gc-sections, /DISCARD/, > > etc) in

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread Fangrui Song via Elfutils-devel
On 2020-05-31, Mark Wielaard wrote: Hi, On Sun, May 31, 2020 at 11:55:06AM -0700, Fangrui Song via Elfutils-devel wrote: what linkers should do regarding relocations referencing dropped functions (due to section group rules, --gc-sections, /DISCARD/, etc) in .debug_* As an example: __attrib

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread Mark Wielaard
Hi, On Sun, May 31, 2020 at 11:55:06AM -0700, Fangrui Song via Elfutils-devel wrote: > what linkers should do regarding relocations referencing dropped > functions (due to section group rules, --gc-sections, /DISCARD/, > etc) in .debug_* > > As an example: > > __attribute__((section(".text.x"))

Re: Range lists, zero-length functions, linker gc

2020-05-31 Thread Fangrui Song via Elfutils-devel
On 2020-05-31, Fangrui Song wrote: It is being discussed on llvm-dev (https://lists.llvm.org/pipermail/llvm-dev/2020-May/141885.html https://groups.google.com/forum/#!topic/llvm-dev/i0DFx6YSqDA) what linkers should do regarding relocations referencing dropped functions (due to section group rule

Range lists, zero-length functions, linker gc

2020-05-31 Thread Fangrui Song via Elfutils-devel
It is being discussed on llvm-dev (https://lists.llvm.org/pipermail/llvm-dev/2020-May/141885.html https://groups.google.com/forum/#!topic/llvm-dev/i0DFx6YSqDA) what linkers should do regarding relocations referencing dropped functions (due to section group rules, --gc-sections, /DISCARD/, etc) in