You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no method/function to convert elf.Symbol.Info to SymBind and SymType, even thought there is a function ST_INFO to convert SymBind and SymType into uint8.
We probably should have created a new type for Symbol.Info, but we can't do that before Go 2.
Therefore I propose the addition of the following two methods to elf.Symbol:
Perhaps we could also make elf.Symbol implement Stringer, but I'm not sure about the format yet. Any suggestions?
Additionally, the elf package looks like automated conversion from elf.h as it contains a lot of top-level functions will non-idiolmatic names (R_INFO, R_SYM32, etc.) without any docs. For Go 2, we should get rid of them, and turn them into proper methods with idiomatic names.
Currently there is no method/function to convert elf.Symbol.Info to SymBind and SymType
I think you missed elf.ST_BIND and elf.ST_TYPE.
rsc
changed the title
Proposal: introduce methods to debug/elf.Symbol to access Info
proposal: debug/elf: add Symbol methods to access Info
Jan 23, 2017
If you'd like to send a CL or file a separate issue for DynValue, that's fine. You might want to make the implementation build a cache to avoid every call being O(n). I also am not sure if the result should be uint64 or []uint64, but I'll leave it to the actual review. No need for a formal proposal for that.
Will retitle for DynValue and accept.
rsc
changed the title
proposal: debug/elf: add Symbol methods to access Info
proposal: debug/elf: add File.DynValue method to look up DynTag values
Jan 23, 2017
rsc
changed the title
proposal: debug/elf: add File.DynValue method to look up DynTag values
debug/elf: add File.DynValue method to look up DynTag values
Jan 23, 2017
Currently there is no method/function to convert elf.Symbol.Info to SymBind and SymType, even thought there is a function ST_INFO to convert SymBind and SymType into uint8.
We probably should have created a new type for Symbol.Info, but we can't do that before Go 2.
Therefore I propose the addition of the following two methods to elf.Symbol:
Perhaps we could also make elf.Symbol implement Stringer, but I'm not sure about the format yet. Any suggestions?
Additionally, the elf package looks like automated conversion from elf.h as it contains a lot of top-level functions will non-idiolmatic names (R_INFO, R_SYM32, etc.) without any docs. For Go 2, we should get rid of them, and turn them into proper methods with idiomatic names.
/cc @ianlancetaylor
The text was updated successfully, but these errors were encountered: