lkml.org 
[lkml]   [2004]   [May]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 1 May 2004 11:15:52 +0200
FromTomas Szepe <>
SubjectRe: [PATCH] Blacklist binary-only modules lying about their license
On Apr-27 2004, Tue, 23:34 +0200
Robert M. Stockmann <stock@stokkie.net> wrote:

> > Hmm. At least with -sdt=c99 it should be trivial, with something like
> > 
> > #define __MODULE_INFO(tag, name, info) \
> > static struct { int len; const char value[] } \
> > __module_cat(name,__LINE__) __attribute_used__ \
> > __attribute__((section(".modinfo"),unused)) = \
> > { sizeof(__stringify(tag) "=" info), \
> > __stringify(tag) "=" info }
> > 
> > doing the job.
> > 
> > That should make it pretty easy to parse the .modinfo section too.
> > 
> > Linus
> 
> Its a joke anyway gcc3.x allows this to happen.

Why?  Initializing a char pointer to a byte stream that contains a NUL
is perfectly legal C.

> As i posted on the gcc mailinglist some time ago :
[snip]
> checking version of gcc... 2.95.3, bad
> configure: error: Please upgrade your gcc compiler to gcc-2.96+ or gcc-3+ 
> version! Earlier compiler versions will NOT work as these do not support 
> unnamed/annonymous structures and unions which are used heavily in linux-ntfs.
> [jackson:stock]:(~/src/ntfsprogs-1.8.4)$
> 
> Aha, unnamed/annonymous structures and unions .....
> 
> Well thats briljant... in 2 years time all Open Source code will be unnamed
> and anonymous in the form of propiatary .o modules, and Linus will still
> be happy to deliver his /usr/src/linux/kernel subtree of the Linux
[snip]

Well, what was the GCC folks' response?  I'd place my bet on
"Do you even know what an unnamed structure/union is?"

-- 
Tomas Szepe <szepe@pinerecords.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:02    [from the cache]
©2003-2008