mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
Move common symbol check after bed->common_definition
bfd/ * elflink.c (elf_link_add_object_symbols): Move common symbol check after bed->common_definition. ld/ * testsuite/ld-elf/pr21903.s (start): Removed. (_start): Likewise. (__start): Likewise. (main): Likewise. (bar): New.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* elflink.c (elf_link_add_object_symbols): Move common symbol
|
||||||
|
check after bed->common_definition.
|
||||||
|
|
||||||
2017-08-07 Alan Modra <amodra@gmail.com>
|
2017-08-07 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 21910
|
PR 21910
|
||||||
|
@ -4250,15 +4250,16 @@ error_free_dyn:
|
|||||||
|
|
||||||
override = FALSE;
|
override = FALSE;
|
||||||
|
|
||||||
/* Treat common symbol as undefined for --no-define-common. */
|
|
||||||
if (isym->st_shndx == SHN_COMMON
|
|
||||||
&& info->inhibit_common_definition)
|
|
||||||
isym->st_shndx = SHN_UNDEF;
|
|
||||||
|
|
||||||
flags = BSF_NO_FLAGS;
|
flags = BSF_NO_FLAGS;
|
||||||
sec = NULL;
|
sec = NULL;
|
||||||
value = isym->st_value;
|
value = isym->st_value;
|
||||||
common = bed->common_definition (isym);
|
common = bed->common_definition (isym);
|
||||||
|
if (common && info->inhibit_common_definition)
|
||||||
|
{
|
||||||
|
/* Treat common symbol as undefined for --no-define-common. */
|
||||||
|
isym->st_shndx = SHN_UNDEF;
|
||||||
|
common = FALSE;
|
||||||
|
}
|
||||||
discarded = FALSE;
|
discarded = FALSE;
|
||||||
|
|
||||||
bind = ELF_ST_BIND (isym->st_info);
|
bind = ELF_ST_BIND (isym->st_info);
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* testsuite/ld-elf/pr21903.s (start): Removed.
|
||||||
|
(_start): Likewise.
|
||||||
|
(__start): Likewise.
|
||||||
|
(main): Likewise.
|
||||||
|
(bar): New.
|
||||||
|
|
||||||
2017-08-07 Alan Modra <amodra@gmail.com>
|
2017-08-07 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* testsuite/ld-alpha/alpha.exp: Add --hash-style=sysv to various
|
* testsuite/ld-alpha/alpha.exp: Add --hash-style=sysv to various
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
.text
|
.text
|
||||||
.global start /* Used by SH targets. */
|
.global bar
|
||||||
start:
|
bar:
|
||||||
.global _start
|
.byte 0
|
||||||
_start:
|
.data
|
||||||
.global __start
|
|
||||||
__start:
|
|
||||||
.global main /* Used by HPPA targets. */
|
|
||||||
main:
|
|
||||||
.dc.a foo
|
.dc.a foo
|
||||||
.ifdef HPUX
|
.ifdef HPUX
|
||||||
foo .comm 4
|
foo .comm 4
|
||||||
|
Reference in New Issue
Block a user