2018-01-12 04:17:46 +01:00
|
|
|
|
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
PR ld/22393
|
|
|
|
|
* testsuite/ld-elf/pr16322.d: Add -z noseparate-code.
|
|
|
|
|
* testsuite/ld-elf/pr22393-1.s: New file.
|
|
|
|
|
* testsuite/ld-elf/pr22393-1a.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-1b.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-1c.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-1d.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-1e.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-1f.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-2a.c: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-2a.rd: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-2b.c: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22393-2b.rd: Likewise.
|
|
|
|
|
* testsuite/ld-elf/shared.exp: Run tests for -z separate-code.
|
|
|
|
|
|
2018-01-12 04:01:39 +01:00
|
|
|
|
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
PR ld/22393
|
|
|
|
|
* NEWS: Mention "-z separate-code".
|
|
|
|
|
* emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Get
|
|
|
|
|
builtin linker scripts and return linker scripts from disk for
|
|
|
|
|
"-z separate-code".
|
|
|
|
|
(gld${EMULATION_NAME}_handle_option): Handle "-z separate-code"
|
|
|
|
|
and "-z noseparate-code".
|
|
|
|
|
* genscripts.sh: Generate linker scripts for "-z separate-code".
|
|
|
|
|
(LD_FLAG): Set to *textonly for "-z separate-code".
|
|
|
|
|
* ld.texinfo: Document "-z separate-code".
|
|
|
|
|
* lexsup.c (elf_shlib_list_options): Add linker help messsages
|
|
|
|
|
for "-z separate-code" and "-z noseparate-code".
|
|
|
|
|
* scripttempl/elf.sc (SEPARATE_TEXT): New
|
|
|
|
|
(TEXT_SEGMENT_ALIGN): Likewise.
|
|
|
|
|
Use ${TEXT_SEGMENT_ALIGN} to align and pad text segment to
|
|
|
|
|
${MAXPAGESIZE}.
|
|
|
|
|
|
2018-01-12 00:36:40 +01:00
|
|
|
|
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
PR ld/22649
|
|
|
|
|
* testsuite/ld-elf/pr22649-1.s: New file.
|
|
|
|
|
* testsuite/ld-elf/pr22649-2a.s: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22649-2b.s: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr22649.msg: Likewise.
|
|
|
|
|
* testsuite/ld-elf/shared.exp: Run ld/22649 tests.
|
|
|
|
|
|
2018-01-11 18:42:12 +01:00
|
|
|
|
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
PR ld/22677
|
|
|
|
|
* scripttempl/elf.sc (PREINIT_ARRAY): New.
|
|
|
|
|
Don't add .preinit_array for ld -r.
|
|
|
|
|
* testsuite/ld-elf/pr22677.d: New file.
|
|
|
|
|
* testsuite/ld-elf/pr22677.s: Likewise.
|
|
|
|
|
|
2018-01-05 15:59:05 +01:00
|
|
|
|
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* ldexp.h (union etree_union): Remove defsym field.
|
|
|
|
|
* ldexp.c (exp_assop): Remove defsym parameter, and use of defsym
|
|
|
|
|
parameter.
|
|
|
|
|
(exp_assign): Remove passing of defsym parameter.
|
|
|
|
|
(exp_defsym): Likewise.
|
|
|
|
|
(exp_provide): Likewise.
|
|
|
|
|
|
ld: Fix issue where PROVIDE overrides defined symbol
In a linker script, a sequence like this:
foo = ADDR (.some_section);
bar = foo;
PROVIDE (foo = 0);
will result in 'bar = ADDR (.some_section)' and 'foo = 0', which seems
like incorrect behaviour, foo is clearly defined elsewhere, and so the
PROVIDE should not trigger.
The problem is that an expression like this:
foo = ADDR (.some_section);
can't be evaluated until a late phase of the linker, due to the need
for the section '.some_section' to have been placed, then the PROVIDE
was being marked as being used during an earlier phase. At the end of
the link, both lines:
foo = ADDR (.some_section);
PROVIDE (foo = 0);
are active, and this causes the final value of 'foo' to be 0.
The solution proposed in this commit is that, during earlier phases of
the linker, when we see the expression 'foo = ADDR (.some_section);',
instead of ignoring the expression, we create a "fake" definition of
'foo'. The existence of this "fake" definition prevents the PROVIDE
from being marked used, and during the final phase the real definition
of 'foo' will replace the "fake" definition.
The new test provide-6 covers the exact case described above. The
provide-7 test is similar to the above, but using constant
expressions, this was never broken, but is added here to increase
coverage.
The provide-8 case also didn't fail before this commit, but I did
manage to break this case during development of this patch. This case
was only covered by a mmix test before, so I've added this here to
increase coverage.
ld/ChangeLog:
* ldexp.c (exp_fold_tree_1): Rework condition underwhich provide
nodes are ignored in the tree walk, and move the location at which
we change provide nodes into provided nodes.
(exp_init_os): Add etree_provided.
* testsuite/ld-scripts/provide-6.d: New file.
* testsuite/ld-scripts/provide-6.t: New file.
* testsuite/ld-scripts/provide-7.d: New file.
* testsuite/ld-scripts/provide-7.t: New file.
* testsuite/ld-scripts/provide-8.d: New file.
* testsuite/ld-scripts/provide-8.t: New file.
2017-04-27 19:05:08 +02:00
|
|
|
|
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* ldexp.c (exp_fold_tree_1): Rework condition underwhich provide
|
|
|
|
|
nodes are ignored in the tree walk, and move the location at which
|
|
|
|
|
we change provide nodes into provided nodes.
|
|
|
|
|
(exp_init_os): Add etree_provided.
|
|
|
|
|
* testsuite/ld-scripts/provide-6.d: New file.
|
|
|
|
|
* testsuite/ld-scripts/provide-6.t: New file.
|
|
|
|
|
* testsuite/ld-scripts/provide-7.d: New file.
|
|
|
|
|
* testsuite/ld-scripts/provide-7.t: New file.
|
|
|
|
|
* testsuite/ld-scripts/provide-8.d: New file.
|
|
|
|
|
* testsuite/ld-scripts/provide-8.t: New file.
|
|
|
|
|
|
2017-04-27 18:53:28 +02:00
|
|
|
|
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-scripts/provide-3.d: Add xfail directive.
|
|
|
|
|
* testsuite/ld-scripts/provide-4.d: Use new map file name.
|
|
|
|
|
* testsuite/ld-scripts/provide-5.d: Use new map file name.
|
|
|
|
|
* testsuite/ld-scripts/provide-4-map.d: Renamed to...
|
|
|
|
|
* testsuite/ld-scripts/provide-4.map: ...this.
|
|
|
|
|
* testsuite/ld-scripts/provide-5-map.d: Renamed to...
|
|
|
|
|
* testsuite/ld-scripts/provide-5.map: ...this.
|
|
|
|
|
* testsuite/ld-scripts/provide.exp: Move xfail into provide-3.d
|
|
|
|
|
file, and run tests in a loop.
|
|
|
|
|
|
2018-01-05 23:41:55 +01:00
|
|
|
|
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
|
|
2018-01-11 14:05:25 +01:00
|
|
|
|
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
PR ld/22696
|
|
|
|
|
* scripttempl/elf.sc: Fix the order of SHLIB_RODATA_ADDR.
|
|
|
|
|
|
2018-01-09 19:08:47 +01:00
|
|
|
|
2018-01-09 Jim Wilson <jimw@sifive.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-elf/eh-frame-hdr.d (#xfail): Delete
|
|
|
|
|
(#alltargets): Renamed from #target. Add shared.
|
|
|
|
|
* testsuite/lib/ld-lib.exp (run_dump_test): Document shared target.
|
|
|
|
|
Document alltargets option. Add support for alltargets option.
|
|
|
|
|
(istarget): Add support for shared target.
|
|
|
|
|
|
2018-01-09 02:55:29 +01:00
|
|
|
|
2018-01-08 Jim Wilson <jimw@sifive.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-riscv-elf/c-lui.d: Don't use -shared. Check for _start
|
|
|
|
|
instead of .text.
|
|
|
|
|
* testsuite/ld-riscv-elf/c-lui.s: Add _start label.
|
|
|
|
|
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Before __global_pointer$
|
|
|
|
|
tests, add call to check_shared_lib_support.
|
|
|
|
|
|
2018-01-05 23:29:49 +01:00
|
|
|
|
2018-01-05 Jim Wilson <jimw@sifive.com>
|
|
|
|
|
|
2018-01-06 02:51:23 +01:00
|
|
|
|
* testsuite/ld-riscv-elf/disas-jalr.d: New.
|
|
|
|
|
* testsuite/ld-riscv-elf/disas-jalr.s: New.
|
|
|
|
|
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run new testcase.
|
|
|
|
|
|
2018-01-05 23:29:49 +01:00
|
|
|
|
* emulparams/elf32lriscv-defs.sh (GENERATE_SHLIB_SCRIPT): Move inside
|
|
|
|
|
case on $target, and don't set for riscv*-elf targets.
|
|
|
|
|
(GENERATE_PIE_SCRIPT): Likewise.
|
|
|
|
|
|
2018-01-03 06:17:27 +01:00
|
|
|
|
2018-01-03 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
Update year range in copyright notice of all files.
|
|
|
|
|
|
2018-01-03 06:15:17 +01:00
|
|
|
|
For older changes see ChangeLog-2017
|
2016-01-01 11:44:31 +01:00
|
|
|
|
|
2018-01-03 06:15:17 +01:00
|
|
|
|
Copyright (C) 2018 Free Software Foundation, Inc.
|
2016-01-01 11:44:31 +01:00
|
|
|
|
|
|
|
|
|
Copying and distribution of this file, with or without modification,
|
|
|
|
|
are permitted in any medium without royalty provided the copyright
|
|
|
|
|
notice and this notice are preserved.
|
|
|
|
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
mode: change-log
|
|
|
|
|
left-margin: 8
|
|
|
|
|
fill-column: 74
|
|
|
|
|
version-control: never
|
|
|
|
|
End:
|