Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332985 - gnu.targets link fails if a filename contains '-'
Summary: gnu.targets link fails if a filename contains '-'
Status: CLOSED FIXED
Alias: None
Product: RTSC
Classification: Technology
Component: Targets (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Sasha Slijepcevic CLA
QA Contact:
URL:
Whiteboard: target:3.20.07,3.21
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-20 18:44 EST by Sasha Slijepcevic CLA
Modified: 2011-06-20 14:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sasha Slijepcevic CLA 2010-12-20 18:44:57 EST
The linker command line adds -Wl,-T in front of the name of the linker command script. If the name of the script contains '-' (or some other character other than a-z, A-z, '_' or '.'), the regex that adds -Wl,-T fails and doesn't add anything.
That causes a default linker command script not to be included, which then causes the error with a message:
.gnu.attributes not found for insert
Comment 1 Sasha Slijepcevic CLA 2010-12-28 20:34:18 EST
- fixed in xdctest-c39 and xdctest-d13
A regex expression that was looking for an xdl file in the command line is now simpler, only looking for any number of non-space characters ending with .xdl.
The relevant code is in gnu/targets/ITarget.xs in function link().
Comment 2 Amit Mookerjee CLA 2011-01-13 18:28:48 EST
Reproduced problem with XDCtools 3.20.06.81 by using a configuration script with the '-' character in it. Used the 'gnu.targets.arm.GCArmv6' target and the gcc 4.4.1 codesourcery compiler. Confirmed that the problem is fixed in XDCtools 3.20.07.84-eng. 

Reviewed fix by inspection in $TREES/xdctargets/xdctargets-c39/src/gnu/targets/ITarget.xs and $TREES/xdctargets/xdctargets-d13/src/gnu/targets/ITarget.xs
Comment 3 Dave Russo CLA 2011-06-20 14:05:02 EDT
Shipped in XDCtools 3.21