libctf: add the object index and function index sections
authorNick Alcock <nick.alcock@oracle.com>
Thu, 11 Jul 2019 15:21:26 +0000 (16:21 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 3 Oct 2019 16:04:55 +0000 (17:04 +0100)
commit2db912ba1a9e1c249cb4795f781fd4ea9fe9e7f2
treeb2fbac05c35401a797365b1ce7f4f12f6cb70ff4
parent6d5944fca682fe97f37e537f78b665ada2400f51
libctf: add the object index and function index sections

No code handles these yet, but our latest GCC patches are generating
them, so we have to be ready for them or erroneously conclude that we
have file corruption.

(This simultaneously fixes a longstanding bug, concealed because nothing
was generating anything in the object or function info sections, where
the end of the section was being tested against the wrong thing: it
would have walked over the entire contents of the variable section and
treated them as part of the function info section.  This had to change
now anyway because the new sections have landed in between.)

include/
* ctf.h: Add object index and function index sections.  Describe
them. Improve the description of the variable section and clarify
the constraints on backward-pointing type nodes.
(ctf_header): Add cth_objtidxoff, cth_funcidxoff.

libctf/
* ctf-open.c (init_symtab): Check for overflow against the right
section.
(upgrade_header): Set cth_objtidxoff, cth_funcidxoff to zero-length.
(upgrade_types_v1): Note that these sections are not checked.
(flip_header): Endian-swap the header fields.
(flip_ctf): Endian-swap the sections.
(flip_objts): Update comment.
(ctf_bufopen): Check header offsets and alignment for validity.
include/ChangeLog
include/ctf.h
libctf/ChangeLog
libctf/ctf-open.c
This page took 0.025053 seconds and 4 git commands to generate.