Re: [RFC] Change PCH "checksum"

2019-02-27 Thread Nathan Sidwell
On 2/26/19 11:18 AM, Michael Matz wrote: Hi, On Tue, 26 Feb 2019, Richard Biener wrote: get_build_id_1 (struct dl_phdr_info *info, size_t, void *data) { Isn't this all a bit silly? We could simply encode the svn revision, or maybe even just some random bytes generated once in stage1 at buil

Re: [RFC] Change PCH "checksum"

2019-02-27 Thread Florian Weimer
* Richard Biener: >> Since the introduction of GNU Property notes this is (sadly) no longer >> the correct way to iterate through ELF notes. The padding of names and >> desc might now depend on the alignment of the PT_NOTE segment. >> https://sourceware.org/ml/binutils/2018-09/msg00359.html > > I

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Mark Wielaard
On Tue, 2019-02-26 at 18:13 +0100, Richard Biener wrote: > > > That would mean when p_align == 8 the note name isn't 8-aligned > > > but just 4-aligned? That is, sizeof (Elf*_Nhdr) == 12, and the > > > name starts right after that instead of being aligned according > > > to p_align? That sounds o

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Richard Biener
On Tue, 26 Feb 2019, Mark Wielaard wrote: > On Tue, 2019-02-26 at 15:36 +0100, Richard Biener wrote: > > On Tue, 26 Feb 2019, Mark Wielaard wrote: > > > > > On Tue, 2019-02-26 at 09:33 +0100, Richard Biener wrote: > > > > On Mon, 25 Feb 2019, Mark Wielaard wrote: > > > > > Since the introduction

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Mark Wielaard
On Tue, 2019-02-26 at 15:36 +0100, Richard Biener wrote: > On Tue, 26 Feb 2019, Mark Wielaard wrote: > > > On Tue, 2019-02-26 at 09:33 +0100, Richard Biener wrote: > > > On Mon, 25 Feb 2019, Mark Wielaard wrote: > > > > Since the introduction of GNU Property notes this is (sadly) no > > > > longer

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Richard Biener
On Tue, 26 Feb 2019, Michael Matz wrote: > Hi, > > On Tue, 26 Feb 2019, Richard Biener wrote: > > > get_build_id_1 (struct dl_phdr_info *info, size_t, void *data) > > { > > Isn't this all a bit silly? We could simply encode the svn revision, or > maybe even just some random bytes generated o

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Michael Matz
Hi, On Tue, 26 Feb 2019, Richard Biener wrote: > get_build_id_1 (struct dl_phdr_info *info, size_t, void *data) > { Isn't this all a bit silly? We could simply encode the svn revision, or maybe even just some random bytes generated once in stage1 at build time as "checksum" and be done with.

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Richard Biener
On Tue, 26 Feb 2019, Richard Biener wrote: > On Tue, 26 Feb 2019, Mark Wielaard wrote: > > > On Tue, 2019-02-26 at 09:33 +0100, Richard Biener wrote: > > > On Mon, 25 Feb 2019, Mark Wielaard wrote: > > > > Since the introduction of GNU Property notes this is (sadly) no > > > > longer > > > > the

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Richard Biener
On Tue, 26 Feb 2019, Mark Wielaard wrote: > On Tue, 2019-02-26 at 09:33 +0100, Richard Biener wrote: > > On Mon, 25 Feb 2019, Mark Wielaard wrote: > > > Since the introduction of GNU Property notes this is (sadly) no > > > longer > > > the correct way to iterate through ELF notes. The padding of n

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Mark Wielaard
On Tue, 2019-02-26 at 09:33 +0100, Richard Biener wrote: > On Mon, 25 Feb 2019, Mark Wielaard wrote: > > Since the introduction of GNU Property notes this is (sadly) no > > longer > > the correct way to iterate through ELF notes. The padding of names > > and > > desc might now depend on the alignm

Re: [RFC] Change PCH "checksum"

2019-02-26 Thread Richard Biener
On Mon, 25 Feb 2019, Mark Wielaard wrote: > On Fri, 2019-02-22 at 12:29 +0100, Richard Biener wrote: > > +struct build_id_note { > > +/* The NHdr. */ > > +uint32_t namesz; > > +uint32_t descsz; > > +uint32_t type; > > + > > +char name[4]; /* Note name for build-id is "GNU\0" *

Re: [RFC] Change PCH "checksum"

2019-02-25 Thread Mark Wielaard
On Fri, 2019-02-22 at 12:29 +0100, Richard Biener wrote: > +struct build_id_note { > +/* The NHdr. */ > +uint32_t namesz; > +uint32_t descsz; > +uint32_t type; > + > +char name[4]; /* Note name for build-id is "GNU\0" */ > +unsigned char build_id[16]; > +}; Note that build

Re: [RFC] Change PCH "checksum"

2019-02-22 Thread Richard Biener
On February 22, 2019 5:03:46 PM GMT+01:00, Jakub Jelinek wrote: >On Fri, Feb 22, 2019 at 08:47:09AM -0700, Jeff Law wrote: >> > 2019-02-22 Richard Biener >> > >> >c/ >> >* Make-lang.in (cc1-checksum.c): Checksum only gtype-desc.o. >> > >> >cp/ >> >* Make-lang.in (cc1plus-chec

Re: [RFC] Change PCH "checksum"

2019-02-22 Thread Jakub Jelinek
On Fri, Feb 22, 2019 at 08:47:09AM -0700, Jeff Law wrote: > > 2019-02-22 Richard Biener > > > > c/ > > * Make-lang.in (cc1-checksum.c): Checksum only gtype-desc.o. > > > > cp/ > > * Make-lang.in (cc1plus-checksum.c): Checksum only gtype-desc.o. > > > > objc/ > > * Make

Re: [RFC] Change PCH "checksum"

2019-02-22 Thread Jeff Law
On 2/22/19 4:29 AM, Richard Biener wrote: > > GCC builds are currently not reproducible because for one the checksum > we compute for PCH purposes (by genchecksum) nowaways includes checksums > of archives (since we switched from checksumming a dummy executable > to checksumming object files). Th

[RFC] Change PCH "checksum"

2019-02-22 Thread Richard Biener
GCC builds are currently not reproducible because for one the checksum we compute for PCH purposes (by genchecksum) nowaways includes checksums of archives (since we switched from checksumming a dummy executable to checksumming object files). That includes dates (unless built with -D which we do