This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] Add missing copyrights
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, OndÅej BÃlka <neleai at seznam dot cz>, libc-alpha at sourceware dot org
- Date: Wed, 12 Jun 2013 14:13:18 -0700 (PDT)
- Subject: Re: [RFC] Add missing copyrights
- References: <20130611133800 dot GA4128 at domone dot kolej dot mff dot cuni dot cz> <Pine dot LNX dot 4 dot 64 dot 1306111928100 dot 897 at digraph dot polyomino dot org dot uk> <20130611200107 dot 34B552C058 at topped-with-meat dot com> <51B78716 dot 9090701 at redhat dot com> <20130611210407 dot 25B9F2C09D at topped-with-meat dot com> <51B79607 dot 4050002 at redhat dot com> <20130611213518 dot 5D9C82C09F at topped-with-meat dot com> <51B7A361 dot 5030904 at redhat dot com> <20130611224559 dot A79852C045 at topped-with-meat dot com> <51B7AB5B dot 4070605 at redhat dot com> <20130611230332 dot 73B692C07D at topped-with-meat dot com> <51B8BCDD dot 40607 at redhat dot com>
> Is it sufficient to generate a link map of a template application, parse
> the objects that were pulled into the link, then locate those objects
> and look at all the sources files that generated them, determining if
> their source files have the correct license with exception?
Yes, for an appropriate definition of "template application". (I
don't really know what you meant by that.) For the crt* files, any
application will do. For libc_nonshared stuff, you'd need an
application that calls every entry point that's defined in
libc_nonshared. Since keeping track of what's in that set is half
the battle, this doesn't seem like it's really the right approach.
It actually seems both easier and less error-prone just to examine
the installed ${libdir}/*crt*.o and ${libdir}/*_nonshared.a files.
Taking it from the object files of interest, there are two obvious
ways to go about it. One is what you implied: look at their DWARF
info to see the list of source files. The other is something akin
to what we do with stub_warning to generate gnu/stubs.h contents.
That is, have each source file with exception text use a macro that
emits an empty section with a special name. Then it's easy to check
each object file for this section (and perhaps remove them for
installation so they don't ever appear in user programs).
Thanks,
Roland