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

Document the behaviour difference between LLD and GNU LD while using --defsym for library selection #463

Merged
merged 3 commits into from
Aug 15, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ however there are some known differences to take into account, see:
in the LLD documentation.
* The [LLD and GNU linker incompatibilities](https://maskray.me/blog/2020-12-19-lld-and-gnu-linker-incompatibilities)
blog post.
* When selecting the printf/scanf library variant with `--defsym from=to`, see:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* When selecting the printf/scanf library variant with `--defsym from=to`, see:
* When selecting the printf/scanf picolibc implementation variant with `--defsym from=to`, see

[How to use defsym](https://github.com/picolibc/picolibc/blob/main/doc/printf.md), LLD includes not only the specified
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[How to use defsym](https://github.com/picolibc/picolibc/blob/main/doc/printf.md), LLD includes not only the specified
[Printf and Scanf levels in Picolibc](https://github.com/picolibc/picolibc/blob/main/doc/printf.md#printf-and-scanf-levels-in-picolibc), LLD includes not only the

printf/scanf implementation variant from picolibc through defsym but also the PICOLIBC_DOUBLE_PRINTF_SCANF variant.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
printf/scanf implementation variant from picolibc through defsym but also the PICOLIBC_DOUBLE_PRINTF_SCANF variant.
printf/scanf implementation variant from picolibc specified through `--defsym`, but also the default PICOLIBC_DOUBLE_PRINTF_SCANF variant.

To avoid linking the default variant into the application, you must include the `--gc-sections` linker flag.

## Startup code

Expand Down
Loading