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)
Wed, Sep 18, 11:04 PM
Unknown Object (File)
Wed, Sep 18, 4:43 PM
Unknown Object (File)
Mon, Sep 16, 11:11 AM
Unknown Object (File)
Sat, Sep 14, 2:19 AM
Unknown Object (File)
Tue, Sep 10, 11:48 PM
Unknown Object (File)
Wed, Sep 4, 8:28 AM
Unknown Object (File)
Sat, Aug 31, 2:31 PM
Unknown Object (File)
Aug 24 2024, 10:44 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.