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
See man ld for a description of what --whole-archive needs to do.
--whole-archive is a modifier that is pushed / popped by --push-state / --pop-state, so the value of the flag should be added to the Modifiers struct (in args.rs).
The method where the whole_archive attribute should be used is ParsedInputObject::is_optional.
It'd be good to have a test that verifies that --whole-archive is behaving as expected. There are probably a few ways such a test could be written. The key observation is that whatever is defined in the archive needs to not be directly referenced from the main test object, otherwise the archived object would be included even without --whole-archive. One option is to have an archive that puts something into a custom section, then have the _start_ function check the custom section for that value. You can look at the test custom_section.c for how this is done.
The text was updated successfully, but these errors were encountered:
See
man ld
for a description of what--whole-archive
needs to do.--whole-archive
is a modifier that is pushed / popped by--push-state
/--pop-state
, so the value of the flag should be added to theModifiers
struct (inargs.rs
).The method where the
whole_archive
attribute should be used isParsedInputObject::is_optional
.It'd be good to have a test that verifies that
--whole-archive
is behaving as expected. There are probably a few ways such a test could be written. The key observation is that whatever is defined in the archive needs to not be directly referenced from the main test object, otherwise the archived object would be included even without--whole-archive
. One option is to have an archive that puts something into a custom section, then have the_start_
function check the custom section for that value. You can look at the testcustom_section.c
for how this is done.The text was updated successfully, but these errors were encountered: