Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Feb 2012 09:03:00 +0100
From:      John Marino <draco@marino.st>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        kan@freebsd.org, Pedro Giffuni <pfg@freebsd.org>, freebsd-toolchain@freebsd.org
Subject:   Re: DragonFly added support for ELF preinit, init, and fini arrays
Message-ID:  <4F40ACB4.8000103@marino.st>
In-Reply-To: <20120218213832.GL3283@deviant.kiev.zoral.com.ua>
References:  <4F3C5A3A.6050107@FreeBSD.org> <20120216154730.GL3283@deviant.kiev.zoral.com.ua> <4F3D3409.3040006@marino.st> <20120216202709.GQ3283@deviant.kiev.zoral.com.ua> <4F3F4AE2.30203@marino.st> <20120218213832.GL3283@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/18/2012 10:38 PM, Konstantin Belousov wrote:
>
> Thank you, it was very useful. It seems that test4 needed some adjustments
> to actually provide the required dso for tests.
Yeah.  I thought I gave you a version that worked out of the box but I 
did modify this test as well.

> Now, the patch at http://people.freebsd.org/~kib/misc/init_array.2.patch
> passes your tests and allows to boot world built with pre-patched csu
> into multiuser mode.
>
> I decided to move the calls to initializers for main binary into rtld,
> and used the brand note to distinguish old and new csu.
I assume the purpose of this is to have a clean split with static 
initialization done in crt1 and dynamic initialization done entirely in 
rtld for binaries built with version 100009 and later.  Does the note 
digestion used to check osrel add significant overhead?

Is not this information already available via aux_vectors passed on from 
imgact_elf.c?

>
> ATM patch is only for i386 and amd64, I will port to other architectures
> after some feedback.
It's out of scope of your current work but related to notes, but there's 
another test that DragonFly passes that FreeBSD fails.  If memory 
serves, it was caused by the PT_NOTE segment getting located outside of 
the first page the majority of the time starting with binutils 2.21.
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9d35f29fb5dd669d4e04521b39296e5bdf14b2b0

A related problem was an interpret segment outside of the first page:
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/99aed3e43ef052664173110d6db3ddf6a62e375b

Both of these were handled within sys/kern/imgact_elf.c

John






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F40ACB4.8000103>