Page MenuHomeFreeBSD

mips: fix _mcount
ClosedPublic

Authored by kevans on Aug 27 2019, 1:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 16 2024, 5:10 PM
Unknown Object (File)
Apr 29 2024, 9:55 AM
Unknown Object (File)
Apr 29 2024, 7:56 AM
Unknown Object (File)
Apr 29 2024, 6:51 AM
Unknown Object (File)
Apr 27 2024, 5:47 AM
Unknown Object (File)
Apr 27 2024, 5:47 AM
Unknown Object (File)
Apr 27 2024, 5:47 AM
Unknown Object (File)
Apr 27 2024, 3:51 AM
Subscribers
None

Details

Summary

The symbol version for _mcount was removed 12 years ago in rS169525 from gmon/Symbol.map, to be added to the per-arch Symbol.map. mips was overlooked in this, so _mcount has no symver. Add it back to where it should have been, rather than where it would go if it were added today, since we're correcting a historical mistake.

Additionally, _mcount is getting thrown into .mdebug.abi32 in the llvm80/90 world as it's not getting explicitly thrown into .text, so do this now. This fixes the libc build that was previously failing due to relocations in .mdebug.abi32.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

LGTM, but I didn't test it.

This revision is now accepted and ready to land.Aug 29 2019, 4:52 PM

LGTM but I also haven't tested it. I don't know how useful the profile stuff is. If it's not implemented for MIPS64 anyway we could just not build it?

sys/mips/include/profile.h
46 โ†—(On Diff #61350)

It seems like the code won't work for MIPS64 anyway, so we could just disable it?

sys/mips/include/profile.h
46 โ†—(On Diff #61350)

I'd like to keep it functionally equivalent to what we've had with GCC, at least, and have any such discussions about disabling or whatnot later.

This revision was automatically updated to reflect the committed changes.