Skip to content

Conversation

@zhouchengming1
Copy link
Contributor

If a static variable is a pointer, it has rela section.

Example:
static int *p = &a;
changed to:
static int *p = &b;
so its rela section has changed.

Then this change of data should be found and report error.
But if we don't correlate its rela section, we won't
find this change.

Signed-off-by: Zhou ChengMing zhouchengming1@outlook.com

If a static variable is a pointer, it has rela section.

Example:
	static int *p = &a;
changed to:
	static int *p = &b;
so its rela section has changed.

Then this change of data should be found and report error.
But if we don't correlate its rela section, we won't
find this change.

Signed-off-by: Zhou ChengMing <zhouchengming1@outlook.com>
@jpoimboe
Copy link
Member

jpoimboe commented Oct 2, 2015

Thanks @zhouchengming1. The patch looks good to me. Do you happen to have an example patch which produces this bug?

@zhouchengming1
Copy link
Contributor Author

Sorry, I don't have an example patch like this. I just find the bug when watch the code.

sjenning added a commit that referenced this pull request Oct 14, 2015
bugfix: correlate the rela sections of bundled static variables
@sjenning sjenning merged commit efaf980 into dynup:master Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants