Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Apr 2005 12:56:40 +0200
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: INCLUDE_CONFIG_FILE broken?
Message-ID:  <8664yndm6v.fsf@xps.des.no>
In-Reply-To: <20050416093349.I5888@epsplex.bde.org>
References:  <E1DEjZu-0007MN-RR@cs1.cs.huji.ac.il> <86k6ntw6f8.fsf@xps.des.no> <20050415220455.GB1698@slackbox.xs4all.nl> <20050416093349.I5888@epsplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> 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.

Including the config file unaltered as a separate ELF section might be
conceptually cleaner, but objdump(1) doesn't seem to have an option to
dump the unaltered contents of a section (it prints the contents in a
format similar to 'hexdump -C') so we'd need a special-purpose tool to
extract the file.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8664yndm6v.fsf>