Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problem building install kernel with ssh for NSLU2

On Thu, Feb 14, 2008 at 10:04:26AM +0000, Steve Woodford wrote:
> What happens is that some code in a *library* references one or more 
> variables which are supposed to be provided by the application linking 
> against that library. However because crunchgen renames all the 
> application's global variables so that they are unique within the 
> crunched program, the library cannot find them. Hence the link errors.

Actually having libraries access variables (and functions) in the
calling module is problematical at other times, and library interfaces
really need to be designed so that it isn't done.

The problem arises when shared library 'a' dynamically loads shared library
'b', and 'b' needs to read/write 'global' variables in order to pass
information from/to 'a' (eg writing to foo_errno). If 'a' was also
dynamically loaded (so the main program doesn't have a foo_errno variable)
then it is almost impossible for 'b' to write the the location the 'a'
will read.

Oh, for crunchgen I think there is a configurable list of names that
won't be renamed.


David Laight: david%l8s.co.uk@localhost

Home | Main Index | Thread Index | Old Index