From: H.J. Lu Date: Thu, 10 Jan 2013 20:08:03 +0000 (+0000) Subject: Remove trailing white spaces in ld X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4492aa0d87eda6a9442625b59f713bcf4f08922;p=binutils-gdb.git Remove trailing white spaces in ld * deffilep.y: Remove trailing white spaces. * elf-hints-local.h: Likewise. * ldexp.c: Likewise. * ldlang.h: Likewise. * ldmisc.c: Likewise. * ldwrite.c: Likewise. * pe-dll.c: Likewise. * emulparams/criself.sh: Likewise. * emulparams/crislinux.sh: Likewise. * emulparams/elf32_tic6x_le.sh: Likewise. * emulparams/elf32bmipn32-defs.sh: Likewise. * emulparams/elf32mb_linux.sh: Likewise. * emulparams/elf32mep.sh: Likewise. * emulparams/elf32microblaze.sh: Likewise. * emulparams/elf32ppc.sh: Likewise. * emulparams/elf64_s390.sh: Likewise. * emulparams/elf64alpha.sh: Likewise. * emulparams/elf_s390.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/tic80coff.sh: Likewise. * emultempl/aix.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/tic6xdsbt.em: Likewise. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 5fe6ed4dbbb..860f05a872c 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,33 @@ +2013-01-10 H.J. Lu + + * deffilep.y: Remove trailing white spaces. + * elf-hints-local.h: Likewise. + * ldexp.c: Likewise. + * ldlang.h: Likewise. + * ldmisc.c: Likewise. + * ldwrite.c: Likewise. + * pe-dll.c: Likewise. + * emulparams/criself.sh: Likewise. + * emulparams/crislinux.sh: Likewise. + * emulparams/elf32_tic6x_le.sh: Likewise. + * emulparams/elf32bmipn32-defs.sh: Likewise. + * emulparams/elf32mb_linux.sh: Likewise. + * emulparams/elf32mep.sh: Likewise. + * emulparams/elf32microblaze.sh: Likewise. + * emulparams/elf32ppc.sh: Likewise. + * emulparams/elf64_s390.sh: Likewise. + * emulparams/elf64alpha.sh: Likewise. + * emulparams/elf_s390.sh: Likewise. + * emulparams/elf_x86_64.sh: Likewise. + * emulparams/tic80coff.sh: Likewise. + * emultempl/aix.em: Likewise. + * emultempl/avrelf.em: Likewise. + * emultempl/cr16elf.em: Likewise. + * emultempl/pe.em: Likewise. + * emultempl/pep.em: Likewise. + * emultempl/spuelf.em: Likewise. + * emultempl/tic6xdsbt.em: Likewise. + 2013-01-10 Will Newton * Makefile.am: Add Meta. diff --git a/ld/deffilep.y b/ld/deffilep.y index 3afb3ce3ce8..cbc171469d4 100644 --- a/ld/deffilep.y +++ b/ld/deffilep.y @@ -46,13 +46,13 @@ #define yylval def_lval #define yychar def_char #define yydebug def_debug -#define yypact def_pact -#define yyr1 def_r1 -#define yyr2 def_r2 -#define yydef def_def -#define yychk def_chk -#define yypgo def_pgo -#define yyact def_act +#define yypact def_pact +#define yyr1 def_r1 +#define yyr2 def_r2 +#define yydef def_def +#define yychk def_chk +#define yypgo def_pgo +#define yyact def_act #define yyexca def_exca #define yyerrflag def_errflag #define yynerrs def_nerrs @@ -138,7 +138,7 @@ start: start command | command ; -command: +command: NAME opt_name opt_base { def_image_name ($2, $3, 0); } | LIBRARY opt_name opt_base { def_image_name ($2, $3, 1); } | DESCRIPTION ID { def_description ($2);} @@ -147,7 +147,7 @@ command: | CODE attr_list { def_section ("CODE", $2);} | DATAU attr_list { def_section ("DATA", $2);} | SECTIONS seclist - | EXPORTS explist + | EXPORTS explist | IMPORTS implist | VERSIONK NUMBER { def_version ($2, 0);} | VERSIONK NUMBER '.' NUMBER { def_version ($2, $4);} @@ -186,7 +186,7 @@ exp_opt: | PRIVATEU { $$ = 8; } | PRIVATEL { $$ = 8; } ; -implist: +implist: implist impline | impline ; @@ -223,15 +223,15 @@ attr_list: opt_comma: ',' - | + | ; opt_number: ',' NUMBER { $$=$2;} | { $$=-1;} ; - + attr: READ { $$ = 1;} - | WRITE { $$ = 2;} + | WRITE { $$ = 2;} | EXECUTE { $$=4;} | SHARED { $$=8;} ; @@ -275,19 +275,19 @@ opt_name2: ID { $$ = $1; } $$ = name; } | '.' opt_name2 - { + { char *name = def_pool_alloc (strlen ($2) + 2); sprintf (name, ".%s", $2); $$ = name; } | keyword_as_name '.' opt_name2 - { + { char *name = def_pool_alloc (strlen ($1) + 1 + strlen ($3) + 1); sprintf (name, "%s.%s", $1, $3); $$ = name; } | ID '.' opt_name2 - { + { char *name = def_pool_alloc (strlen ($1) + 1 + strlen ($3) + 1); sprintf (name, "%s.%s", $1, $3); $$ = name; @@ -302,14 +302,14 @@ opt_equalequal_name: EQUAL ID { $$ = $2; } | { $$ = 0; } ; -opt_ordinal: +opt_ordinal: '@' NUMBER { $$ = $2;} | { $$ = -1;} ; opt_equal_name: '=' opt_name2 { $$ = $2; } - | { $$ = 0; } + | { $$ = 0; } ; opt_base: BASE '=' NUMBER { $$ = $3;} @@ -960,7 +960,7 @@ def_image_name (const char *name, int base, int is_dll) name); if (def->name) free (def->name); - /* Append the default suffix, if none specified. */ + /* Append the default suffix, if none specified. */ if (strchr (image_name, '.') == 0) { const char * suffix = is_dll ? ".dll" : ".exe"; @@ -1115,7 +1115,7 @@ def_import (const char *internal_name, char *buf = 0; const char *ext = dllext ? dllext : "dll"; int is_dup = 0; - + buf = xmalloc (strlen (module) + strlen (ext) + 2); sprintf (buf, "%s.%s", module, ext); module = buf; @@ -1147,7 +1147,7 @@ static void def_aligncomm (char *str, int align) { def_file_aligncomm *c, *p; - + p = NULL; c = def->aligncomms; while (c != NULL) diff --git a/ld/elf-hints-local.h b/ld/elf-hints-local.h index 67fcb5ca992..02dd019d491 100644 --- a/ld/elf-hints-local.h +++ b/ld/elf-hints-local.h @@ -1,6 +1,6 @@ /* Copyright (c) 1997 John D. Polstra. All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -9,7 +9,7 @@ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE diff --git a/ld/emulparams/criself.sh b/ld/emulparams/criself.sh index f709a1bb63e..9c8ab317a3c 100644 --- a/ld/emulparams/criself.sh +++ b/ld/emulparams/criself.sh @@ -31,8 +31,8 @@ TEXT_START_SYMBOLS='__Stext = ADDR (.startup);' # The __start dance is to get us through assumptions about entry # symbols, and to clear _start for normal use with sane programs. EXECUTABLE_SYMBOLS=' -__start = DEFINED(__start) ? __start : - DEFINED(_start) ? _start : +__start = DEFINED(__start) ? __start : + DEFINED(_start) ? _start : DEFINED(start) ? start : DEFINED(.startup) ? .startup + 2 : 2; ' @@ -98,7 +98,7 @@ CTOR_END=' # Also add the other symbols provided for rsim/xsim and elinux. OTHER_SYMBOLS=' PROVIDE (__Eall = .); - PROVIDE (__Endmem = 0x10000000); + PROVIDE (__Endmem = 0x10000000); PROVIDE (__Stacksize = 0); ' NO_SMALL_DATA=yes diff --git a/ld/emulparams/crislinux.sh b/ld/emulparams/crislinux.sh index 8a1a5b8e5b0..47a9c511cfe 100644 --- a/ld/emulparams/crislinux.sh +++ b/ld/emulparams/crislinux.sh @@ -34,7 +34,7 @@ OTHER_BSS_END_SYMBOLS='PROVIDE (__Ebss = .);' # Also add the other symbols provided for rsim/xsim and elinux. OTHER_SYMBOLS=' PROVIDE (__Eall = .); - PROVIDE (__Endmem = 0x10000000); + PROVIDE (__Endmem = 0x10000000); PROVIDE (__Stacksize = 0); ' NO_SMALL_DATA=yes diff --git a/ld/emulparams/elf32_tic6x_le.sh b/ld/emulparams/elf32_tic6x_le.sh index 4911081f8e8..dfd64c12c47 100644 --- a/ld/emulparams/elf32_tic6x_le.sh +++ b/ld/emulparams/elf32_tic6x_le.sh @@ -47,12 +47,12 @@ OTHER_READWRITE_RELOC_SECTIONS=" case ${target} in *-elf) OTHER_BSS_SECTIONS=" - .heap : - { - . = ALIGN(4); - _HEAP_START = .; - . += 0x2000000; - _HEAP_MAX = .; + .heap : + { + . = ALIGN(4); + _HEAP_START = .; + . += 0x2000000; + _HEAP_MAX = .; } .stack : { diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh index 12aaf72f07f..514990b2573 100644 --- a/ld/emulparams/elf32bmipn32-defs.sh +++ b/ld/emulparams/elf32bmipn32-defs.sh @@ -44,7 +44,7 @@ ENTRY=__start OTHER_GOT_RELOC_SECTIONS=" .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) } " -# GOT-related settings. +# GOT-related settings. # If the output has a GOT section, there must be exactly 0x7ff0 bytes # between .got and _gp. The ". = ." below stops the orphan code from # inserting other sections between the assignment to _gp and the start diff --git a/ld/emulparams/elf32mb_linux.sh b/ld/emulparams/elf32mb_linux.sh index bb60d1fee34..ccb633ebe05 100644 --- a/ld/emulparams/elf32mb_linux.sh +++ b/ld/emulparams/elf32mb_linux.sh @@ -16,4 +16,4 @@ GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes NO_SMALL_DATA=yes SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0" - + diff --git a/ld/emulparams/elf32mep.sh b/ld/emulparams/elf32mep.sh index f72fe2af4d7..2ebbda1bdc4 100755 --- a/ld/emulparams/elf32mep.sh +++ b/ld/emulparams/elf32mep.sh @@ -23,7 +23,7 @@ OTHER_READONLY_SECTIONS=' __stack_size = 0x100000; __stack0 = (__stack - (0 * (__stack_size / 1)) + 15) / 16 * 16; - .rostacktab : + .rostacktab : { /* Emit a table describing the location of the different stacks. Only 1 processor in the default configuration. */ diff --git a/ld/emulparams/elf32microblaze.sh b/ld/emulparams/elf32microblaze.sh index 1f804473faa..8595e2dba43 100644 --- a/ld/emulparams/elf32microblaze.sh +++ b/ld/emulparams/elf32microblaze.sh @@ -22,4 +22,4 @@ NOP=0x80000000 TEMPLATE_NAME=elf32 #GENERATE_SHLIB_SCRIPT=yes - + diff --git a/ld/emulparams/elf32ppc.sh b/ld/emulparams/elf32ppc.sh index 8e1a9f3ede4..c3da11593a2 100644 --- a/ld/emulparams/elf32ppc.sh +++ b/ld/emulparams/elf32ppc.sh @@ -1,5 +1,5 @@ # If you change this file, please also look at files which source this one: -# elf32lppcnto.sh elf32lppc.sh elf32ppclinux.sh elf32ppcnto.sh +# elf32lppcnto.sh elf32lppc.sh elf32ppclinux.sh elf32ppcnto.sh # elf32ppcsim.sh . ${srcdir}/emulparams/elf32ppccommon.sh diff --git a/ld/emulparams/elf64_s390.sh b/ld/emulparams/elf64_s390.sh index 61d4c029588..98db3d3bc61 100644 --- a/ld/emulparams/elf64_s390.sh +++ b/ld/emulparams/elf64_s390.sh @@ -9,7 +9,7 @@ ARCH="s390:64-bit" MACHINE= NOP=0x07070707 TEMPLATE_NAME=elf32 -GENERATE_SHLIB_SCRIPT=yes +GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes NO_SMALL_DATA=yes IREL_IN_PLT= diff --git a/ld/emulparams/elf64alpha.sh b/ld/emulparams/elf64alpha.sh index 82f505de69b..9a275b73e65 100644 --- a/ld/emulparams/elf64alpha.sh +++ b/ld/emulparams/elf64alpha.sh @@ -19,7 +19,7 @@ PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }" DATA_PLT=yes TEXT_PLT=yes -# Note that the number is always big-endian, thus we have to +# Note that the number is always big-endian, thus we have to # reverse the digit string. NOP=0x0000fe2f1f04ff47 # unop; nop diff --git a/ld/emulparams/elf_s390.sh b/ld/emulparams/elf_s390.sh index 8f35cf3cb05..f2286ecc160 100644 --- a/ld/emulparams/elf_s390.sh +++ b/ld/emulparams/elf_s390.sh @@ -8,7 +8,7 @@ ARCH="s390:31-bit" MACHINE= NOP=0x07070707 TEMPLATE_NAME=elf32 -GENERATE_SHLIB_SCRIPT=yes -GENERATE_PIE_SCRIPT=yes +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes NO_SMALL_DATA=yes IREL_IN_PLT= diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh index ae849e0b8b6..4842257c292 100644 --- a/ld/emulparams/elf_x86_64.sh +++ b/ld/emulparams/elf_x86_64.sh @@ -32,7 +32,7 @@ case "$target" in *64*) LIBPATH_SUFFIX=64 ;; esac ;; - *-*-solaris2*) + *-*-solaris2*) LIBPATH_SUFFIX=/amd64 ELF_INTERPRETER_NAME=\"/lib/amd64/ld.so.1\" ;; diff --git a/ld/emulparams/tic80coff.sh b/ld/emulparams/tic80coff.sh index 088e9b03478..5fce9349376 100644 --- a/ld/emulparams/tic80coff.sh +++ b/ld/emulparams/tic80coff.sh @@ -39,7 +39,7 @@ ARCH=tic80 # TEXT_START_ADDR=0x2000000 -# The genscripts.sh script uses this to set the default value of +# The genscripts.sh script uses this to set the default value of # DATA_ALIGNMENT when running the scripttempl script. # # SEGMENT_SIZE= diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index 3f6a097f4a3..b48228a134e 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -361,7 +361,7 @@ read_file_list (const char *filename) /* Replace end of line by nul. */ if (*e != '\0') *e++ = '\0'; - + if (b != e) lang_add_input_file (b, lang_input_file_is_search_file_enum, NULL); b = e; diff --git a/ld/emultempl/avrelf.em b/ld/emultempl/avrelf.em index bfb9d5c4204..e0d6357ba18 100644 --- a/ld/emultempl/avrelf.em +++ b/ld/emultempl/avrelf.em @@ -72,7 +72,7 @@ avr_elf_${EMULATION_NAME}_before_allocation (void) gld${EMULATION_NAME}_before_allocation (); /* We only need stubs for avr6, avrxmega6, and avrxmega7. */ - if (strcmp ("${EMULATION_NAME}","avr6") + if (strcmp ("${EMULATION_NAME}","avr6") && strcmp ("${EMULATION_NAME}","avrxmega6") && strcmp ("${EMULATION_NAME}","avrxmega7") ) avr_no_stubs = TRUE; diff --git a/ld/emultempl/cr16elf.em b/ld/emultempl/cr16elf.em index 9850bda6b12..f76b95e2dfe 100644 --- a/ld/emultempl/cr16elf.em +++ b/ld/emultempl/cr16elf.em @@ -87,7 +87,7 @@ cr16_elf_after_open (void) /* Double check that all other data sections are empty, as is required for embedded PIC code. */ - bfd_map_over_sections (abfd, check_sections, datasec); + bfd_map_over_sections (abfd, check_sections, datasec); } } } diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index a565eb7f780..68049a72d69 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -261,7 +261,7 @@ fragment <output_section, *bout = bsec->output_section; bfd_vma avma, bvma; - + /* If there's no output section for some reason, compare equal. */ if (!aout || !bout) return 0; - + avma = aout->vma + asec->output_offset; bvma = bout->vma + bsec->output_offset; - + if (avma > bvma) return 1; else if (avma < bvma) return -1; - + return 0; } @@ -109,10 +109,10 @@ gld${EMULATION_NAME}_after_allocation (void) { bfd *abfd = is->the_bfd; asection *sec; - + if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) continue; - + for (sec = abfd->sections; sec != NULL; sec = sec->next) { asection *out_sec = sec->output_section; @@ -128,7 +128,7 @@ gld${EMULATION_NAME}_after_allocation (void) if (sec_count == list_size) { list_size *= 2; - sec_list = (asection **) + sec_list = (asection **) xrealloc (sec_list, list_size * sizeof (asection *)); } @@ -136,13 +136,13 @@ gld${EMULATION_NAME}_after_allocation (void) } } } - + qsort (sec_list, sec_count, sizeof (asection *), &compare_output_sec_vma); - + if (elf32_tic6x_fix_exidx_coverage (sec_list, sec_count, &link_info, merge_exidx_entries)) layout_changed = 1; - + free (sec_list); } diff --git a/ld/ldexp.c b/ld/ldexp.c index 5f4e9747e26..ae3919b5502 100644 --- a/ld/ldexp.c +++ b/ld/ldexp.c @@ -312,7 +312,7 @@ fold_binary (etree_type *tree) /* Check to see if the user has overridden the default value. */ segment_name = tree->binary.rhs->name.name; - for (seg = segments; seg; seg = seg->next) + for (seg = segments; seg; seg = seg->next) if (strcmp (seg->name, segment_name) == 0) { if (!seg->used @@ -697,7 +697,7 @@ fold_name (etree_type *tree) / bfd_octets_per_byte (link_info.output_bfd)); else val = (bfd_vma)1 << os->bfd_section->alignment_power; - + new_number (val); } else @@ -708,11 +708,11 @@ fold_name (etree_type *tree) case LENGTH: { lang_memory_region_type *mem; - - mem = lang_memory_region_lookup (tree->name.name, FALSE); - if (mem != NULL) + + mem = lang_memory_region_lookup (tree->name.name, FALSE); + if (mem != NULL) new_number (mem->length); - else + else einfo (_("%F%S: undefined MEMORY region `%s'" " referenced in expression\n"), tree, tree->name.name); @@ -723,11 +723,11 @@ fold_name (etree_type *tree) if (expld.phase != lang_first_phase_enum) { lang_memory_region_type *mem; - - mem = lang_memory_region_lookup (tree->name.name, FALSE); - if (mem != NULL) + + mem = lang_memory_region_lookup (tree->name.name, FALSE); + if (mem != NULL) new_rel_from_abs (mem->origin); - else + else einfo (_("%F%S: undefined MEMORY region `%s'" " referenced in expression\n"), tree, tree->name.name); diff --git a/ld/ldlang.h b/ld/ldlang.h index d5ea8d20e34..00e37578d5b 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -162,9 +162,9 @@ typedef struct lang_output_section_statement_struct unsigned int processed_lma : 1; unsigned int all_input_readonly : 1; /* If this section should be ignored. */ - unsigned int ignored : 1; + unsigned int ignored : 1; /* If this section should update "dot". Prevents section being ignored. */ - unsigned int update_dot : 1; + unsigned int update_dot : 1; /* If this section is after assignment to _end. */ unsigned int after_end : 1; } lang_output_section_statement_type; diff --git a/ld/ldmisc.c b/ld/ldmisc.c index ca1896ff1c0..2569bcc6712 100644 --- a/ld/ldmisc.c +++ b/ld/ldmisc.c @@ -304,7 +304,7 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning) /* The GNU Coding Standard requires that error messages be of the form: - + source-file-name:lineno: message We do not always have a line number available so if diff --git a/ld/ldwrite.c b/ld/ldwrite.c index c6f6e9c5e61..aad085090e5 100644 --- a/ld/ldwrite.c +++ b/ld/ldwrite.c @@ -338,7 +338,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count) { char *tname; char *sname; - unsigned int len; + unsigned int len; asection *n; struct bfd_link_hash_entry *h; diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 31beac828dc..76a1ce3d256 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -2844,7 +2844,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name) struct key_value *kv; struct key_value key; char *at, *lname = (char *) alloca (strlen (name) + 3); - + strcpy (lname, name); at = strchr (lname + (lname[0] == '@'), '@'); @@ -2925,7 +2925,7 @@ pe_find_cdecl_alias_match (struct bfd_link_info *linfo, char *name) if (h->type == bfd_link_hash_undefined) return h; } - + return NULL; }