[PATCH 1/2] libfdt: Add version.lds file

Josh Boyer jwboyer at linux.vnet.ibm.com
Wed Nov 26 04:16:48 EST 2008


On Tue, Nov 25, 2008 at 11:57:47AM -0500, Josh Boyer wrote:
>On Tue, Nov 25, 2008 at 10:50:32AM -0600, Jon Loeliger wrote:
>>> Add the initial symbol versioning file as groundwork for creating
>>> a libfdt shared library
>>> 
>>> Signed-off-by: Josh Boyer <jwboyer at linux.vnet.ibm.com>
>>> ---
>>>  libfdt/version.lds |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
>>>  1 files changed, 48 insertions(+), 0 deletions(-)
>>>  create mode 100644 libfdt/version.lds
>>> 
>>> diff --git a/libfdt/version.lds b/libfdt/version.lds
>>> new file mode 100644
>>> index 0000000..7d90672
>>> --- /dev/null
>>> +++ b/libfdt/version.lds
>>> @@ -0,0 +1,48 @@
>>> +LIBFDT_1.2 {
>>> +	global:
>>> +		fdt_next_node;
>>> +		fdt_check_header;
>>> +		fdt_move;
>>> +		fdt_string;
>>
>>Oh wow....  Any mechanism for making this a NOT hard-coded list?
>>Some in-source macro-doo-dad-flag-setup-section-list thing?
>
>Yeah, I had the same thought.  I'll look a bit more, but this is what
>libhugetlbfs is using at the moment.  The only other library I'm
>remotely familiar with that does versioning is glibc.  Maybe they
>have magic foo I can steal.

No really awesome magic.  They have a similar mechanism of having
a hard-coded list.  We could do something like this in the source
code:

#define fdt_func ver_1_2_fdt_func
int fdt_func(...) {

and then this in version.lds:

LIBFDT_1.2 {
	global:
		ver_1_2*;
}

but that seems pretty ugly too...

The hard-coded list is pretty simple, at the risk of missing things.

josh



More information about the devicetree-discuss mailing list