https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30417

--- Comment #13 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Senthil Kumar Selvaraj from comment #12)
> This works if the start of data is specified as -Tdata 0xaddress. Other ways
> of specifying the same thing don't work; -Tdata=0xaddress,
> -Wl,-Tdata=0xaddress or -Wl,-Tdata,0xaddress all fail.

Hard to fix all these in the compiler like -Wl,--section-start

We could document the current behavior and that -Tdata or -Ttext should be
used.

Or we could introduce a new option to use in the specs only and that also wraps
around like %{!mnew-option:%{!Tdata:Tdata ...}}

In any case the user must read the documentation and be aware of the new option
or the recommended practice.

A new option does not make much sense because instead of -mnew-option she could
just as well use -Tdata as needed...

> Do you know why the linker picks the option first appearing on the
> commandline, rather than the usual last?

No, and dunno how the linker handles several maybe conflicting multiple
specifications.

Reply via email to