Page MenuHomeFreeBSD

i386/boot2: -fno-asynchronous-unwind-tables for gcc
ClosedPublic

Authored by rlibby on Aug 9 2017, 12:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 4:11 PM
Unknown Object (File)
Nov 21 2024, 11:12 AM
Unknown Object (File)
Nov 8 2024, 3:11 AM
Unknown Object (File)
Sep 30 2024, 3:32 PM
Unknown Object (File)
Sep 27 2024, 1:00 PM
Unknown Object (File)
Sep 27 2024, 12:04 AM
Unknown Object (File)
Sep 17 2024, 11:08 PM
Unknown Object (File)
Sep 6 2024, 1:01 AM
Subscribers

Details

Summary

The amd64 build of boot2 was failing with gcc 6.3.0 due to being more than 1 kB too large. It was apparently generating a .eh_frame section which was not being removed by objcopy -S. The .eh_frame section seems to be mandatory per the amd64 ABI, but boot2 is compiled for i386 (uses -m32), and therefore should be optional in this context. Suppress generation of .eh_frame with the -fno-asynchronous-unwind-tables flag to gcc. This saves 1348 bytes (the limit is 7680 bytes).

Test Plan

amd64/gcc buildworld

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks reasonable to me. This switch is supported in gcc 4.2 and newer so we don't need anything conditional.

This revision is now accepted and ready to land.Aug 9 2017, 2:20 PM
This revision was automatically updated to reflect the committed changes.