Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for symbol collisions in add-patches-section and cleanup #55

Merged
merged 4 commits into from
Mar 18, 2014
Merged

Fixes for symbol collisions in add-patches-section and cleanup #55

merged 4 commits into from
Mar 18, 2014

Conversation

sjenning
Copy link
Contributor

Plus some cleanups and adding a TODO

@jpoimboe
Copy link
Member

I think this would be a good case for adding an additional test for the test suite. Should we use a separate PR for that?

@sjenning
Copy link
Contributor Author

Yes, I should write a testcase for this. I'll get on that as a separate PR when I get back.

@jpoimboe
Copy link
Member

So github doesn't seem to be showing commit comments in PRs any more, which is really confusing me. Not sure what's up with that. I'm not sure if you saw my comment, but it had to do with the "add file hint to link-vmlinux-syms" commit. Line 260 guarantees that the symbol is global, but line 274 is doing file hinting which doesn't make sense for a global symbol. I don't know which line is wrong, but I think there's a discrepancy there.

@sjenning
Copy link
Contributor Author

Yes, I saw it and agree. I think the limiting to global symbols of the wrong part, not the hint. I need to look at it closer. I will on Monday. Thanks for the review!

@jpoimboe
Copy link
Member

Sounds good, I'm out. Have a good weekend :-)

Currently, add-patches-section just blindly looks in vmlinux
for a function symbol matching the name of the patched function
in the input object file.  However, for local symbols, they may
appear multiple times in the vmlinux symbol table since the symbol
name may be reused locally in different files.

This commit add support for "file hinting".  It tracks what
file the symbol is in and searches for local symbols within
that file in vmlinux first.  If it doesn't find one, it then
searches globally like it always has.

Fixes issue #53

Signed-off-by: Seth Jennings <sjenning@redhat.com>
Signed-off-by: Seth Jennings <sjenning@redhat.com>
Signed-off-by: Seth Jennings <sjenning@redhat.com>
Signed-off-by: Seth Jennings <sjenning@redhat.com>
@sjenning sjenning changed the title Fixes for symbol collisions in add-patches-section and link-vmlinux-syms Fixes for symbol collisions in add-patches-section and cleanup Mar 18, 2014
jpoimboe added a commit that referenced this pull request Mar 18, 2014
Fixes for symbol collisions in add-patches-section and cleanup
@jpoimboe jpoimboe merged commit b9f5546 into dynup:master Mar 18, 2014
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.

None yet

2 participants