forked from Imagelibrary/binutils-gdb
* lexsup.c (parse_args): Set check_section_addresses to 1 or 0.
* ld.h (args_type): Make check_section_addresses a char. ldlang.c (lang_process): Don't consider relocatable flag when checking for overlap. * ldmain.c (main): Default check_section_addresses to -1. Check it for relocatable links. * ld.texinfo (--check-sections): Update documentation.
This commit is contained in:
10
ld/ChangeLog
10
ld/ChangeLog
@@ -1,3 +1,13 @@
|
||||
2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* lexsup.c (parse_args): Set check_section_addresses to 1 or 0.
|
||||
* ld.h (args_type): Make check_section_addresses a char.
|
||||
ldlang.c (lang_process): Don't consider relocatable flag when
|
||||
checking for overlap.
|
||||
* ldmain.c (main): Default check_section_addresses to -1. Check it
|
||||
for relocatable links.
|
||||
* ld.texinfo (--check-sections): Update documentation.
|
||||
|
||||
2009-01-26 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* pe-dll.c (tmp_seq2): New static variable.
|
||||
|
||||
7
ld/ld.h
7
ld/ld.h
@@ -167,10 +167,9 @@ typedef struct {
|
||||
search. */
|
||||
bfd_boolean warn_search_mismatch;
|
||||
|
||||
|
||||
/* If TRUE (the default) check section addresses, once compute,
|
||||
fpor overlaps. */
|
||||
bfd_boolean check_section_addresses;
|
||||
/* If non-zero check section addresses, once computed,
|
||||
for overlaps. Relocatable links only check when this is > 0. */
|
||||
signed char check_section_addresses;
|
||||
|
||||
/* If TRUE allow the linking of input files in an unknown architecture
|
||||
assuming that the user knows what they are doing. This was the old
|
||||
|
||||
@@ -1205,6 +1205,9 @@ perform this check, and if it finds any overlaps it will produce
|
||||
suitable error messages. The linker does know about, and does make
|
||||
allowances for sections in overlays. The default behaviour can be
|
||||
restored by using the command line switch @option{--check-sections}.
|
||||
Section overlap is not usually checked for relocatable links. You can
|
||||
force checking in that case by using the @option{--check-sections}
|
||||
option.
|
||||
|
||||
@cindex cross reference table
|
||||
@kindex --cref
|
||||
|
||||
@@ -251,7 +251,7 @@ main (int argc, char **argv)
|
||||
|
||||
command_line.warn_mismatch = TRUE;
|
||||
command_line.warn_search_mismatch = TRUE;
|
||||
command_line.check_section_addresses = TRUE;
|
||||
command_line.check_section_addresses = -1;
|
||||
|
||||
/* We initialize DEMANGLING based on the environment variable
|
||||
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
|
||||
@@ -292,6 +292,8 @@ main (int argc, char **argv)
|
||||
|
||||
if (link_info.relocatable)
|
||||
{
|
||||
if (command_line.check_section_addresses < 0)
|
||||
command_line.check_section_addresses = 0;
|
||||
if (command_line.relax)
|
||||
einfo (_("%P%F: --relax and -r may not be used together\n"));
|
||||
if (link_info.shared)
|
||||
|
||||
@@ -1411,10 +1411,10 @@ parse_args (unsigned argc, char **argv)
|
||||
config.split_by_file = 1;
|
||||
break;
|
||||
case OPTION_CHECK_SECTIONS:
|
||||
command_line.check_section_addresses = TRUE;
|
||||
command_line.check_section_addresses = 1;
|
||||
break;
|
||||
case OPTION_NO_CHECK_SECTIONS:
|
||||
command_line.check_section_addresses = FALSE;
|
||||
command_line.check_section_addresses = 0;
|
||||
break;
|
||||
case OPTION_ACCEPT_UNKNOWN_INPUT_ARCH:
|
||||
command_line.accept_unknown_input_arch = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user