Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] Some tweaks for ELF



On Aug 27, 10:44am, martin%duskware.de@localhost (Martin Husemann) wrote:
-- Subject: Re: [PATCH] Some tweaks for ELF

| On Tue, Aug 27, 2013 at 04:37:30AM -0400, Christos Zoulas wrote:
| > Useful or not, it currently works :-)
| 
| Yes, and if we need it for compat: fine. Out of curiosity: why does linux
| produce some binaries with ET_DYN and other with ET_EXEC? We only seem
| to do ET_EXEC for native binaries.

I think because:

    http://www.gentoo.org/proj/en/hardened/etdyn.xml

and IIRC our PaX / PIE binaries does not have such a requirement (because
we use a note to describe what we want done).

| Anyway: I wonder if we should just do:
| 
| int elf_check_header(Elf_Ehdr *eh, bool *is_dyn)
| 
| and hardclode ET_EXEC and ET_DYN inside that function, setting *is_dyn
| to true if we find ET_DYN.
| 
| While breaking the API, we could also move the test for 0 sections inside.

Fine with me. I if we are calling elf_check_header multiple times, we should
not.

christos


Home | Main Index | Thread Index | Old Index