Fix typo in section list#8726
Merged
earlephilhower merged 1 commit intoesp8266:masterfrom Nov 23, 2022
Merged
Conversation
For GCC LD scripts, using commas in a section expression sometimes cause problems.
earlephilhower
approved these changes
Nov 23, 2022
Collaborator
earlephilhower
left a comment
There was a problem hiding this comment.
From https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_chapter/ld_3.html it looks like the comma should work, but it's also legal to just use spaces.
* (section)
* (section, section, ...)
* (section section ...)
Instead of explicitly naming particular input files in a link control script, you can refer to all files from the ld command line: use `*' instead of a particular file name before the parenthesized input-file section list. If you have already explicitly included some files by name, `*' refers to all remaining files--those whose places in the output file have not yet been defined. For example, to copy sections 1 through 4 from an Oasys file into the .text section of an a.out file, and sections 13 and 14 into the .data section:
SECTIONS {
.text :{
*("1" "2" "3" "4")
}
.data :{
*("13" "14")
}
}
`[ section ... ]' used to be accepted as an alternate way to specify named sections from all unallocated input files. Because some operating systems (VMS) allow brackets in file names, that notation is no longer supported.
So, LGTM, especially since this was proven as fixing something broken!
hasenradball
pushed a commit
to hasenradball/Arduino
that referenced
this pull request
Nov 18, 2024
For GCC LD scripts, using commas in a section expression sometimes cause problems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For GCC LD scripts, using commas in a section expression sometimes cause problems.
With this change,
.text.gdbstub*moved from IROM to IRAM where it was intended to be.@earlephilhower please correct me or confirm. Thanks!
Resolves issue #8716
I could not find an explanation of how a "," was to be interpreted. It looks like a simple
*(.somthing*, .something2*)worked; however, a more complex*(.text.something*, .text.something2*)did not - most of the time.I don't have much experience with LD scripts. Anyone with more insight please help.