This is the mail archive of the mailing list for the binutils project.

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: [RFC][MIPS] What to do about DT_MIPS_RLD_MAP and PIE

> I'm a bit stumped as to what the technical benefit was/is about having a read
> only dynamic section. Does anyone know?

The inverse question is more interesting.  That is, why do other machines
have a writable .dynamic section?  The only actually useful aspect of that
I'm aware of is DT_DEBUG.  For all the others, it's just tradition to
update the values in place with the load-base adjustment.  The main
downside is consuming space on a data page that will get COW, which in some
binaries will tip the balance so one additional page gets COW than would
have if .dynamic were in the read-only segment.

I don't know why the original design (by AT&T in SVR4, where ELF was
invented) used a writable section.  I have always presumed that most
machines followed that example just to be similar to the earliest machines,
which did it that way; and that MIPS decided to diverge because read-only
just made more sense from first principles.


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