Page MenuHomeFreeBSD

elf.5: document FreeBSD ELF notes
ClosedPublic

Authored by emaste on Mar 6 2020, 12:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 30 2024, 1:46 PM
Unknown Object (File)
Sep 18 2024, 10:58 PM
Unknown Object (File)
Sep 17 2024, 3:37 PM
Unknown Object (File)
Sep 17 2024, 4:01 AM
Unknown Object (File)
Sep 8 2024, 8:19 PM
Unknown Object (File)
Sep 8 2024, 1:35 PM
Unknown Object (File)
Sep 8 2024, 7:32 AM
Unknown Object (File)
Sep 7 2024, 8:28 PM
Subscribers

Details

Summary

Need some work on markup still and a few more details

Diff Detail

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

Event Timeline

manpages, can you advise how to do appropriate markup for the NT_FREEBSD_* tags?

I'm hoping for something like
NT_FREEBSD_ABI_TAG (OS ABI version)
type: 1
desc: 32-bit integer
Specifies expected ABI version (i.e., __FreeBSD_version)

NT_FREEBSD_NOINIT_TAG
type: 2
desc: ignored
Indicates that crt does not call init.

jkoshy_users.sourceforge.net added inline comments.
share/man/man5/elf.5
1280 ↗(On Diff #69247)

"FreeBSD Note sections ..."?

1314 ↗(On Diff #69247)

Do these have symbolic constants too?

This revision is now accepted and ready to land.Mar 6 2020, 7:29 AM
share/man/man5/elf.5
1280 ↗(On Diff #69247)

I agree, it should be made clear that listed notes are defined by FreeBSD. In principle, freebsd binaries can contain vendor-independed notes too, e.g. build id (is it note ?)

1314 ↗(On Diff #69247)

Point to security(7)

1315 ↗(On Diff #69247)

Might be reference mmap(2), otherwise it is too cryptic.

1317 ↗(On Diff #69247)

It might be better to write W+X as 'simultaneously writeable and executable'

share/man/man5/elf.5
1280 ↗(On Diff #69247)

Yes, fair point, but note the existing text above

This section holds information in the
.Dq Note Section
format described below.

and in particular this table is about ELF notes in general, not FreeBSD specific.

Perhaps another .Ss for FreeBSD ELF notes below (where .Fx defines the following... is)

  • rebase after committing generic ELF note text.
  • add bit symbolic names

still need to add @kib's cross references/explanations, but need help with markup

This revision now requires review to proceed.Mar 16 2020, 1:54 PM
emaste added inline comments.
share/man/man5/elf.5
1280 ↗(On Diff #69247)

And yes the build ID is in a note.

1317 ↗(On Diff #69247)

The table already does not fit (each row is wrapped to two lines), so I need to figure out how to format this appropriately.

0mp added inline comments.
share/man/man5/elf.5
1300 ↗(On Diff #69566)

I am not sure but please check that defines is not interpreted by .Fx as a FreeBSD version.

share/man/man5/elf.5
1306 ↗(On Diff #69566)

Trailing whitespace.

@emaste, I've uploaded a (hopefully) improved patch here: https://people.freebsd.org/~0mp/elf.5.patch

I recommend looking at the HTML generated from the manual page. It helps getting the styles right: mandoc -Tlint elf.5 > elf.html && firefox elf.html.

@0mp should the struct elements instead be .Va? That's what's used in stat(2) for the definition of struct stat.

share/man/man5/elf.5
1300 ↗(On Diff #69566)

It seems like not, but I suppose

.Fx
defines the ...

is better anyhow?

@0mp should the struct elements instead be .Va? That's what's used in stat(2) for the definition of struct stat.

Hmm, but in stat(2) those names are variables (or members of a struct). Hmmm, why not. .Va seems like a good idea.

(BTW, I'd not use .Sy as it is already used by table headers).

share/man/man5/elf.5
1300 ↗(On Diff #69566)

Yes!

This revision was not accepted when it landed; it landed in state Needs Review.Apr 1 2020, 3:34 PM
This revision was automatically updated to reflect the committed changes.