On 11/11/2013 15:32, Mark Wielaard wrote:
> On Sun, 2013-11-10 at 00:45 +0100, Robert Millan wrote:
>> ELFOSABI_FREEBSD indicates this
>> binary has been built to run on kFreeBSD and uses its kernel ABI.
>>
>> If a binary is set to ELFOSABI_LINUX, then the kernel will enable Linux
>> emulation mode, i.e. Linux syscall interface.
> 
> Aha. Interesting. Just curious. On Debain GNU/FreeBSD wouldn't the
> emulation mode be more natural?

Not really... It wouldn't solve anything and instead raise wrong
expectations about the APIs we provide. Then we'd struggle trying to
live up to those expectations.

Most of Debian userland is not biased towards Linux syscall interface.
It generally just interacts with glibc.

>> Nothing as far as ELF compliance is concerned. This tag is ment to be
>> consumed by the kernel ELF loader only.
> 
> For elfutils elflint it also matters for things like STB_GNU_UNIQUE and
> STT_GNU_IFUNC. Does ELFOSABI_FREEBSD indicate the binaray can or cannot
> contain such symbol types or bindings?

No, it just gives information about the kernel<->user ABI.

AFAIK STB_GNU_UNIQUE and STT_GNU_IFUNC are userland facilities. Is this
correct?

> elflint assumes those only occur
> with ELFOSABI_LINUX currently.

Well I suppose you could extend this assumption to cover
ELFOSABI_FREEBSD as well?

Though presence of ELFOSABI_FREEBSD is not enough to determine that they
are available.

> /proc/PID/maps, /proc/PID/exe, /proc/PID/mem,

Mostly OK I think.

> /proc/TID/status

It seems we don't have this. At least not in 9.0. :-(

> and /proc/PID/auvx

Neither...

> And /proc/kallsyms and /proc/modules are used to inspect kernel modules with 
> libdwfl.

Nope. For module listing we have kldstat() / kldfind() / kldnext().

> See libdwfl/linux-proc-maps.c (backend for dwfl_linux_proc_report)
> and libdwfl/linux-kernel-modules.c (backend for 
> dwfl_linux_kernel_report_kernel and dwfl_linux_kernel_report_modules). 
> Someone might want to provide
> backends for kfreebsd if the corresponding libdwfl dwfl_linux_*
functionality is wanted there. The kernel parts probably won't easily
work, the user
> space parts probably will assuming the /proc interface is linprocfs style and 
> sufficiently compatible.

Is it possible to disable this functionality on kFreeBSD? A quick
linprocfs solution seems like dead-end, and we really don't have the
manpower to write new backends from scratch.

-- 
Robert Millan


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to