[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] constructor/destructor support
From: |
Michael Matz |
Subject: |
Re: [Tinycc-devel] constructor/destructor support |
Date: |
Mon, 28 Oct 2019 09:39:40 +0000 (UTC) |
User-agent: |
Alpine 2.21 (LSU 202 2017-01-01) |
Hello,
On Fri, 25 Oct 2019, Herman ten Brugge via Tinycc-devel wrote:
> I implemented constructors and destructors. This was the one thing I was
> missing for my own project.
>
> See the attachment.
>
> Can I push it?
Could you please refactor some things? In particular the duplicate code
of add_init_array and add_fini_array: instead add just one function
(add_sec_array?) that takes the name of the section. Also if you test
the section size for being != 0 before creating the dynamic tags
(DT_INIT* and friends) it might be that you can avoid having to add the
'create' argument to find_section; it would be nice to not have to have
it.
Otherwise, looks good. Thanks for the work. (And yeah, bonus points for
Windows and -run support :) ).
Ciao,
Michael.