Peter Wemm peter at
Tue Apr 19 23:54:49 PDT 2005

On Saturday 16 April 2005 03:56 am, Dag-Erling Smørgrav wrote:
> Bruce Evans <bde at> writes:
> > You could just use the existing mechanism __IDSTRING(), preferably
> > after fixing it to actually work.  (__IDSTRING() generates invalid
> > asm if the string has a newline in it.  Among other bugs, this
> > breaks most uses of __COPYRIGHT().)
> __IDSTRING() places the string in a separate section.  By default,
> strings(1) only extracts strings from code and data sections, so the
> good old 'strings -n 3 kernel | grep \^___' wouldn't work.  Not a big
> deal, but still a slight POLA breach.

True, but 'strings -a' will do the entire file...

Or we can do what linux does and insert things into any section we like 
by using the gas
  .incbin "filename"
construct.  I'm not sure if I like that any more than using objcopy to 
insert a section.
Peter Wemm - peter at; peter at; peter at
"All of this is for nothing if we don't go to the stars" - JMS/B5

More information about the freebsd-amd64 mailing list