This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cyg_user_start() in a library


I would like to place my version of 'cyg_user_start()' in a library.  My
version calls yet another 'main()' replacement, 'mymain()' which is supplied
by the application.  The problem is, the linker finds the version of
'cyg_user_start()' in the eCos library before it finds my version of
'cyg_user_start()'.  Does anybody have any suggestions as to how I can
override the version of 'cyg_user_start()' in the eCos library with a
version in a second library?  (For the moment, I am working around this
problem by explicitly listing the filename containing my version of
'cyg_user_start()' on the linker command line, but that is a little
cumbersome).

Not knowing anything at all about the "weak" attribute supported by GCC, I
guess I would have assumed that, since the version of 'cyg_user_start()'
declared in the eCos library was given a "weak" attribute, I could override
it in another library.  Obviously, if I create my own version of
'cyg_user_start()' and specify the file containing it on the command line
for the linker, it will always override a version listed in a library,
regardless of whether the library version has a "weak" attribute or not.
So, what does the "weak" attribute do?

--wpd


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]