While discussing D122856 with Pavel on IRC, he pointed out that the current design allows that the file contents could be mapped by one object file plugin and then used by another. Presumably the idea here was to avoid mapping the same file twice. That becomes problematic for ObjectFileELF which after D122856 will map the file as read-write.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
It would be better if we could automatically "reset" these variables by having the plugins accept them as values instead of references. Does anyone I actually need the new values of the variables after these functions are done? I know of at least one place, which actively tries to avoid that...
Comment Actions
Yes, that's the general idea, but you forgot the CreateMemoryInstance callback -- we should fix that too.