This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [David Mosberger <davidm@hpl.hp.com>] problem with unwind info for .init/.fini sections


On Sat, Mar 02, 2002 at 11:13:13AM -0800, David Mosberger wrote:
> >>>>> On Sat, 2 Mar 2002 10:59:39 -0800, "H . J . Lu" <hjl@lucon.org> said:
> 
>   HJ> The problem is you are searching all input files. It doesn't
>   HJ> matter they are used or not.
> 
> Doesn't your patch do the same?  It's safe to create the entries
> needlessly, though it would obviously be better if that didn't happen.
> If you know a way to do that, great.

Mine stops as soon as all 3 sections are found.

> 
>   HJ> Here is a new patch.
> 
> Looks to me like this could end up creating the same DT*ARRAY entries
> multiple times, no?

Mine checks the mask. It sets array/arraysz and the mask if the mask is
0. It only creates the DT entry if array is not 0. If the mask is not
0, array will be 0 and no duplicated DT entry will be added.

> 
>   HJ> Also, those new sections should be in the data segment.
> 
> Good point.
> 
>   HJ> BTW, should we allow both .init/.fini and the array sections.
> 
> Yes.
> 
>   HJ> If both exist, how should ld.so treat them?
> 
> See the Sys V ABI.  IIRC, .init gets executed before .init_array and
> .fini_array gets executed before .fini.
> 

How should we deal with "ld -init SYMBOL -fini SYMBOL"? Right now, ld
will replace .init/.fini sections with those symbols. Should we add
"-init-array SYMBOL"?


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]