This is the mail archive of the mailing list for the newlib 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]

Re: [PATCH 2/2, newlib] Allow locking routine to be retargeted

OK, more strangeness...

The idea that a linking error will be produced when you provide an
incomplete retarteging implementation generally works correctly, with
exception of two locks. If I remove the storage for most of the locks,
linking indeed fails with "multiple definitions" error. But this does
not apply to the lock for at_quick_exit() ("__atexit_mutex" or
"__at_quick_exit_mutex") and telldir() ("__dd_hash_lock" or

1. Why is the lock used by at_quick_exit() not required - I have no
idea. The linking error (when I do not provide storage for this lock)
about multiple definitions is visible only when I actually use the
at_quick_exit() function.

2. It seems that the lock for dd_hash from posix/telldir.c is not
really needed, at least with the newlib configuration which I'm using.
Whole posix/ folder is not compiled at all, so no file from this path
is included in libc.a. Sorry for the earlier confusion.


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