Page MenuHomeFreeBSD

Add ElfW() macro for compatibility with Linux.
ClosedPublic

Authored by dim on Aug 5 2021, 7:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 25, 9:53 AM
Unknown Object (File)
Thu, Aug 20, 6:00 AM
Unknown Object (File)
Sat, Aug 15, 11:13 AM
Unknown Object (File)
Wed, Aug 12, 10:53 PM
Unknown Object (File)
Wed, Aug 12, 8:40 PM
Unknown Object (File)
Tue, Aug 11, 4:35 AM
Unknown Object (File)
Mon, Aug 10, 12:12 PM
Unknown Object (File)
Mon, Aug 10, 12:08 PM
Subscribers

Details

Summary

Some Linux software using ELF headers assumes the existence of an
ElfW(type) macro, which concatenates 'Elf', the default ELF word size,
and the given type. This is identical to our __ElfN(x) macro in
<sys/elf_generic.h>. Add the macro for compatibility.

Test Plan

maybe this needs an exp-run?

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dim requested review of this revision.Aug 5 2021, 7:00 PM

I think an exp-run is worthwhile

kib added inline comments.
sys/sys/elf_generic.h
60

I think some recommendation would be useful, like

.. with Linux, prefer __ElfN() in FreeBSD code */
This revision is now accepted and ready to land.Aug 5 2021, 10:22 PM
This revision was automatically updated to reflect the committed changes.