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

David Mosberger davidm@napali.hpl.hp.com
Sat Mar 2 11:13:00 GMT 2002


>>>>> 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.

  HJ> Here is a new patch.

Looks to me like this could end up creating the same DT*ARRAY entries
multiple times, no?

  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.

	--david



More information about the Binutils mailing list