Source-Changes-D archive

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

Re: Weak x86 aliases



On Fri, 28 Dec 2018, Cherry G.Mathew wrote:

I think I'll revert these for now, because PVHVM doesn't/shouldn't use
them anyway, but I'd like to know how to fix this properly. modload not
working due to __weak_alias() sounds like something we don't do properly
in the modload path.

The in-kernel linker doesn't deal with weak symbols at all.  It would
need a lot of thought to get it right.  For example, if module A
(containing a weak reference) gets loaded, its weak references don't
resolve.  Then module B gets loaded and defines the symbol(s).  Do we
"go back" and re-run the linker for module A?  Or do we allow the
results to be different depending on module load order?  (If module B
were loaded first, and then module A, the weak reference would get
resolved.)


+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index