+2021-09-21 Nick Clifton <nickc@redhat.com>
+
+ * ldlang.c (lang_end): When computing the entry point, only
+ try the start address of the entry section when creating an
+ executable.
+ * ld.texi (Entry point): Update description of heuristic used to
+ choose the entry point.
+ testsuite/ld-alpha/tlspic.rd: Update expected entry point address.
+ testsuite/ld-arm/tls-gdesc-got.d: Likewise.
+ testsuite/ld-i386/tlsnopic.rd: Likewise.
+ testsuite/ld-ia64/tlspic.rd: Likewise.
+ testsuite/ld-sparc/gotop32.rd: Likewise.
+ testsuite/ld-sparc/gotop64.rd: Likewise.
+ testsuite/ld-sparc/tlssunnopic32.rd: Likewise.
+ testsuite/ld-sparc/tlssunnopic64.rd: Likewise.
+ testsuite/ld-sparc/tlssunpic32.rd: Likewise.
+ testsuite/ld-sparc/tlssunpic64.rd: Likewise.
+ testsuite/ld-tic6x/shlib-1.rd: Likewise.
+ testsuite/ld-tic6x/shlib-1b.rd: Likewise.
+ testsuite/ld-tic6x/shlib-1r.rd: Likewise.
+ testsuite/ld-tic6x/shlib-1rb.rd: Likewise.
+ testsuite/ld-tic6x/shlib-noindex.rd: Likewise.
+ testsuite/ld-x86-64/pr14207.d: Likewise.
+ testsuite/ld-x86-64/tlsdesc.rd: Likewise.
+ testsuite/ld-x86-64/tlspic.rd: Likewise.
+ testsuite/ld-x86-64/tlspic2.rd: Likewise.
+
2021-09-15 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/ld-arc/got-weak.d: Update file.
targets this is @code{start}, but PE- and BeOS-based systems for example
check a list of possible entry symbols, matching the first one found.
@item
-the address of the first byte of the @samp{.text} section, if present;
+the address of the first byte of the code section, if present and an
+executable is being created - the code section is usually
+@samp{.text}, but can be something else;
@item
The address @code{0}.
@end itemize
if (!bfd_set_start_address (link_info.output_bfd, val))
einfo (_("%F%P: can't set start address\n"));
}
- else
+ /* BZ 2004952: Only use the start of the entry section for executables. */
+ else if bfd_link_executable (&link_info)
{
asection *ts;
entry_symbol.name);
}
}
+ else
+ {
+ if (warn)
+ einfo (_("%P: warning: cannot find entry symbol %s;"
+ " not setting start address\n"),
+ entry_symbol.name);
+ }
}
}
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
.*/tls-lib2-got.so: file format elf32-.*arm.*
architecture: arm.*, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
-start address 0x0+8(1e8|220)
+start address 0x[0-9a-f]+
Disassembly of section .got:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
+\[[ 0-9]+\] .shstrtab +.*
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
+\[[ 0-9]+\] .shstrtab +.*
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x10000080
+Entry point 0x[0-9a-f]+
There are 4 program headers, starting at offset 52
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x10000080
+Entry point 0x[0-9a-f]+
There are 4 program headers, starting at offset 52
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x10000080
+Entry point 0x[0-9a-f]+
There are 4 program headers, starting at offset 52
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x10000080
+Entry point 0x[0-9a-f]+
There are 4 program headers, starting at offset 52
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x10000080
+Entry point 0x[0-9a-f]+
There are 4 program headers, starting at offset 52
Program Headers:
#target: x86_64-*-linux*
Elf file type is DYN \(Shared object file\)
-Entry point 0x149
+Entry point 0x[0-9a-f]+
There are 4 program headers, starting at offset 64
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers:
#...
Elf file type is DYN \(Shared object file\)
-Entry point 0x1000
+Entry point 0x[0-9a-f]+
There are [0-9]+ program headers, starting at offset [0-9]+
Program Headers: