• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂b3b9f8d3e99cf46c2f85445cc5189db4c4f47407 (tree)
時間2018-01-12 02:33:20
作者Andrew Burgess <andrew.burgess@embe...>
CommiterAndrew Burgess

Log Message

ld: In map file use '=' in PROVIDE statements

Currently when recording a PROVIDE statement in a linker map file we
display something like:

PROVIDE (SYMBOL, VALUE)

However, in a linker script we write these statements like this:

PROVIDE (SYMBOL = VALUE);

This commit changes the output in the map file to be closer to linker
script format, the map file now contains:

PROVIDE (SYMBOL = VALUE)

The ';' is still missing from the end, but map files are not intended
to be valid linker script input, so adding the ';' just seems like
clutter.

ld/ChangeLog:

* ldexp.c (exp_print_tree): Use '=' instead of ',' when printing
PROVIDE statements.
* testsuite/ld-scripts/provide-4.map: Update expected output.
* testsuite/ld-scripts/provide-5.map: Likewise.

Change Summary

差異

--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
1+2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
2+
3+ * ldexp.c (exp_print_tree): Use '=' instead of ',' when printing
4+ PROVIDE statements.
5+ * testsuite/ld-scripts/provide-4.map: Update expected output.
6+ * testsuite/ld-scripts/provide-5.map: Likewise.
7+
18 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
29
310 PR ld/22696
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -1423,7 +1423,7 @@ exp_print_tree (etree_type *tree)
14231423 break;
14241424 case etree_provide:
14251425 case etree_provided:
1426- fprintf (config.map_file, "PROVIDE (%s, ", tree->assign.dst);
1426+ fprintf (config.map_file, "PROVIDE (%s = ", tree->assign.dst);
14271427 exp_print_tree (tree->assign.src);
14281428 fputc (')', config.map_file);
14291429 break;
--- a/ld/testsuite/ld-scripts/provide-4-map.d
+++ b/ld/testsuite/ld-scripts/provide-4-map.d
@@ -1,13 +1,13 @@
11 #...
22 Linker script and memory map
33 #...
4- \[!provide\] +PROVIDE \(foo, 0x1\)
5- \[!provide\] +PROVIDE \(bar, 0x2\)
6- 0x0+3 +PROVIDE \(baz, 0x3\)
4+ \[!provide\] +PROVIDE \(foo = 0x1\)
5+ \[!provide\] +PROVIDE \(bar = 0x2\)
6+ 0x0+3 +PROVIDE \(baz = 0x3\)
77 #...
88 0x0+2000 +foo
9- \[!provide\] +PROVIDE \(loc1, ALIGN \(\., 0x10\)\)
10- 0x0+2010 +PROVIDE \(loc2, ALIGN \(\., 0x10\)\)
11- \[!provide\] +PROVIDE \(loc3, \(loc1 \+ 0x20\)\)
9+ \[!provide\] +PROVIDE \(loc1 = ALIGN \(\., 0x10\)\)
10+ 0x0+2010 +PROVIDE \(loc2 = ALIGN \(\., 0x10\)\)
11+ \[!provide\] +PROVIDE \(loc3 = \(loc1 \+ 0x20\)\)
1212 0x0+2030 +loc4 = \(loc2 \+ 0x20\)
1313 #...
--- a/ld/testsuite/ld-scripts/provide-5-map.d
+++ b/ld/testsuite/ld-scripts/provide-5-map.d
@@ -2,5 +2,5 @@
22 Linker script and memory map
33 #...
44 0x0+10 +foo = 0x10
5- \[!provide\] +PROVIDE \(foo, bar\)
5+ \[!provide\] +PROVIDE \(foo = bar\)
66 #...