tech-toolchain archive

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

Re: On upgrading elftoolchain in src/



    Date:        Wed, 24 Mar 2021 08:42:37 +0000
    From:        jkoshy%netbsd.org@localhost
    Message-ID:  <588382087.79098.1616533944261%ox91.mailbox.org@localhost>

  | 1. Install <elfdefinitions.h> into /usr/include, per the patch
  |    linked to earlier.

Seems reasonable.  I would suggest just elf.h but we seem to have a
lot of those already, so I won't.

  | (Would /usr/include/sys be a better location?).

see #3 below.

  | 2. Change $NBSRC userspace code that only needs the file format related
  |    types and constants to use the newly installed <elfdefinitions.h>,
  |    instead of <sys/exec_elf.h>.

Fine.

  | 3. Then perhaps change <sys/exec_elf.h> to use <elfdefinitions.h> for
  |    the file format related symbols,

Only if <elfdefinitions.h> is really <sys/elfdefinitions.h>

The kernel build needs to be self-contained, it should not reference
anything that is from /usr/include (outside /usr/include/sys).

You can have a userland <elfdefinitions.h> that non-kernel sources use,
which then uses #include <sys/elfdefinitions.h> to get the definitions
shared with the kernel (along with anything else that might be useful
to userland which the kernel does not need).

  | Do you foresee any issues with implementing this plan?

I don't, but someone who works in this are may (my reply is partly
because sometimes people don't reply to a simple question, but if someone
has given the wrong answer, then they will speak up!)

kre



Home | Main Index | Thread Index | Old Index