linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christopher Li" <sparse@chrisli.org>
To: linux-sparse@vger.kernel.org, Josh Triplett <josh@kernel.org>,
	Codrin Alexandru Grajdeanu <grcodal@gmail.com>,
	alexey.zaytsev@gmail.com
Subject: Fwd: [PATCH 0/10] Sparse linker
Date: Wed, 3 Sep 2008 18:16:24 -0700	[thread overview]
Message-ID: <70318cbf0809031816m69565c5aj9417d9a2e136770d@mail.gmail.com> (raw)
In-Reply-To: <70318cbf0809031808u8610f3h4b3d53a7b76a7799@mail.gmail.com>

Oops, forget to CC the list.

Chris

---------- Forwarded message ----------
From: Chris Li <sparse@chrisli.org>
Date: Wed, Sep 3, 2008 at 6:08 PM
Subject: Re: [PATCH 0/10] Sparse linker
To: alexey.zaytsev@gmail.com


On Wed, Sep 3, 2008 at 2:55 PM,  <alexey.zaytsev@gmail.com> wrote:

> more on the subject, I now agree that we should include the
> intermediate code representation into the object files.

Good.

> for this is a four byte overhead prepended to every
> serializable structure by the allocation wrapper. Also, you

I would rather not have that 4 byte prepended to every
structure. Serialize is just one short stage of the life cycle
of those c structures. Having the permanent extra space
for just that is unnecessary. That 4 bytes meta data also
limits what C structure you can work on. All you need
is being able to map a point into some serialize object
to keep track which object is tracked and which one is not.

After you serialized the data. The meta data can be drop
completely. So the price to pay is for every unknown object
pointer, you need to do a dictionary look up. Only during
the dumping stage. But that price is actually very small,
when you dumping objects. You are mostly limit by the disk
any way. The plus side is: you can work with any objects.
You don't need to waste extra memory for serialization
when you are not doing serialization. You can leave the
object allocation code unchanged.

> have to use a macro when declaring a serializable structure
> (or an array of such) statically. One limitation I was unable
> to overcome is the inability to work with structures used both
> stand-alone and embedded into bigger ones. Luckily, we have no

Like the ctype member inside the "struct symbol"?

> list and serializing it [PATCH 07]. The linker needs to dlopen

Do you use the stander share library for dlopen and dynamic linking
the sparse objects?


> the input "sparse objects", merge the symbol lists, and
> serialize the result [PATCH 08]. The generated code compilation
> is handled by the cgcc, cld and car wrappers [PATCH 09]. To
> look up symbols in sparse object files, a simple program is
> included [PATCH 10].

Do you dump your sparse object in ELF format?

Chris

  parent reply	other threads:[~2008-09-04  1:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03 21:55 [PATCH 0/10] Sparse linker alexey.zaytsev
2008-09-03 21:55 ` [PATCH 01/10] Serialization engine alexey.zaytsev
2008-09-03 21:55   ` [PATCH 02/10] Handle -emit_code and the -o file options alexey.zaytsev
2008-09-03 21:55     ` [PATCH 03/10] Check stdin if no input files given, like cc1 alexey.zaytsev
2008-09-03 21:55       ` [PATCH 04/10] Add char *first_string(struct string_list *) alexey.zaytsev
2008-09-03 21:55         ` [PATCH 05/10] Serializable ptr lists alexey.zaytsev
2008-09-03 21:55           ` [PATCH 06/10] Linker core, serialization and helper functions alexey.zaytsev
2008-09-03 21:55             ` [PATCH 07/10] Let sparse serialize the symbol table of the checked file alexey.zaytsev
2008-09-03 21:55               ` [PATCH 08/10] Sparse Object Link eDitor alexey.zaytsev
2008-09-03 21:55                 ` [PATCH 09/10] Rewrite cgcc, add cld and car to wrap ld and ar alexey.zaytsev
2008-09-03 21:55                   ` [PATCH 10/10] A simple demonstrational program that looks up symbols in sparse object files alexey.zaytsev
     [not found] ` <70318cbf0809031808u8610f3h4b3d53a7b76a7799@mail.gmail.com>
2008-09-04  1:16   ` Christopher Li [this message]
2008-09-04  1:54     ` Fwd: [PATCH 0/10] Sparse linker Tommy Thorn
2008-09-04  4:03     ` Alexey Zaytsev
2008-09-04  7:27       ` Christopher Li
2008-09-04  9:41         ` Alexey Zaytsev
2008-09-04 10:35           ` Christopher Li
2008-09-04 13:29             ` Alexey Zaytsev
2008-09-04 13:35               ` Alexey Zaytsev
2008-09-04 19:04                 ` Christopher Li
2008-09-04 20:21                   ` Alexey Zaytsev
2008-09-04 21:24                     ` Christopher Li
2008-09-05  9:49                       ` Alexey Zaytsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70318cbf0809031816m69565c5aj9417d9a2e136770d@mail.gmail.com \
    --to=sparse@chrisli.org \
    --cc=alexey.zaytsev@gmail.com \
    --cc=grcodal@gmail.com \
    --cc=josh@kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).