Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: disable CONFIDENTIAL='__attribute__((section("confidential")))' on emulator build #7

Closed
karelbilek opened this issue Oct 26, 2018 · 1 comment · Fixed by #1426
Labels
T1B1 legacy Trezor One

Comments

@karelbilek
Copy link
Contributor

on macOS build, CONFIDENTIAL='__attribute__((section("confidential")))' does not work and causes error

error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a comma static CONFIDENTIAL HDNode node; ^ <command line>:2:45: note: expanded from here #define CONFIDENTIAL __attribute__((section("confidential")))

I solved it locally by changing the line in Makefile.include to -DCONFIDENTIAL=''; not sure what is the Right Way here

@prusnak prusnak transferred this issue from trezor/trezor-mcu Apr 15, 2019
@prusnak prusnak added the T1B1 legacy Trezor One label Apr 15, 2019
@prusnak prusnak added this to the backlog-legacy milestone Apr 15, 2019
@ZdenekSL ZdenekSL removed this from the backlog-legacy milestone Jun 27, 2019
@tsusanka tsusanka added this to the backlog milestone Sep 30, 2019
@malinah
Copy link
Contributor

malinah commented Oct 30, 2019

I'm proposing this fix:

#ifdef __MACH__
#define CONFIDENTIAL_SECTION "__DATA,confidential"
#else
#define CONFIDENTIAL_SECTION "confidential"
#endif

#define CONFIDENTIAL __attribute__((section((CONFIDENTIAL_SECTION))))

Unfortunately the fix requires structural changes to the source code since it's not a plain definition that can be passed through gcc -D option as it is now in Makefile.include.

Can't validate on macOS due to build errors:

  • Build system is confusing python2 and python3 scripts.
  • Directory missing /usr/include.
  • Missing objcopy.
    ...

Decide wether legacy should be supported on macOS.

@ZdenekSL ZdenekSL modified the milestones: backlog, freezer Oct 31, 2019
@ZdenekSL ZdenekSL added the W1 label Feb 6, 2020
@prusnak prusnak removed their assignment Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T1B1 legacy Trezor One
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants