Bug 82104 - __stack_chk_fail should not use lazy binding on ELF
Summary: __stack_chk_fail should not use lazy binding on ELF
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-05 10:30 UTC by Florian Weimer
Modified: 2017-09-11 07:44 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-09-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2017-09-05 10:30:35 UTC
__stack_chk_fail is only called when something is critically wrong with the process.  At this point, it is important to minimize the amount of work done by the process.  Calling into the dynamic linker for symbol resolution is risky.  Disabling lazy binding for the call would avoid that.

I expect that avoiding the PLT for the call (the noplt attribute) would take care of that for ELF.
Comment 1 Martin Liška 2017-09-11 07:44:56 UTC
Adding the attribute is quite simple, but I can't verify the request. Jakub?