aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMatt Helsley2019-07-31 11:24:12 -0700
committerSteven Rostedt (VMware)2019-08-31 12:19:39 -0400
commit3f1df12019f333442b12c3b5d110b8fc43eb0b36 (patch)
treebd81e94a57bb644dc05a6763a0ebc1f8c059a09f /net
parent7f5291da4b15ad0ebc0965af41a1a2e3f04c3f08 (diff)
recordmcount: Rewrite error/success handling
Recordmcount uses setjmp/longjmp to manage control flow as it reads and then writes the ELF file. This unusual control flow is hard to follow and check in addition to being unlike kernel coding style. So we rewrite these paths to use regular return values to indicate error/success. When an error or previously-completed object file is found we return an error code following kernel coding conventions -- negative error values and 0 for success when we're not returning a pointer. We return NULL for those that fail and return non-NULL pointers otherwise. One oddity is already_has_rel_mcount -- there we use pointer comparison rather than string comparison to differentiate between previously-processed object files and returning the name of a text section. Link: http://lkml.kernel.org/r/8ba8633d4afe444931f363c8d924bf9565b89a86.1564596289.git.mhelsley@vmware.com Signed-off-by: Matt Helsley <mhelsley@vmware.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions