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

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 someth

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 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-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-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 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