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.
This commit is contained in:
H.J. Lu 2013-01-10 20:08:03 +00:00
parent 68ffbac672
commit e4492aa0d8
28 changed files with 110 additions and 80 deletions

View File

@ -1,3 +1,33 @@
2013-01-10 H.J. Lu <hongjiu.lu@intel.com>
* 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 <will.newton@imgtec.com>
* Makefile.am: Add Meta.

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 :
{

View File

@ -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

View File

@ -16,4 +16,4 @@ GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0"

View File

@ -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. */

View File

@ -22,4 +22,4 @@ NOP=0x80000000
TEMPLATE_NAME=elf32
#GENERATE_SHLIB_SCRIPT=yes

View File

@ -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

View File

@ -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=

View File

@ -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

View File

@ -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=

View File

@ -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\"
;;

View File

@ -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=

View File

@ -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;

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -261,7 +261,7 @@ fragment <<EOF
#define OPTION_DYNAMIC_BASE (OPTION_DISABLE_LONG_SECTION_NAMES + 1)
#define OPTION_FORCE_INTEGRITY (OPTION_DYNAMIC_BASE + 1)
#define OPTION_NX_COMPAT (OPTION_FORCE_INTEGRITY + 1)
#define OPTION_NO_ISOLATION (OPTION_NX_COMPAT + 1)
#define OPTION_NO_ISOLATION (OPTION_NX_COMPAT + 1)
#define OPTION_NO_SEH (OPTION_NO_ISOLATION + 1)
#define OPTION_NO_BIND (OPTION_NO_SEH + 1)
#define OPTION_WDM_DRIVER (OPTION_NO_BIND + 1)
@ -1204,7 +1204,7 @@ pr_sym (struct bfd_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
}
#endif /* DLL_SUPPORT */
static void
static void
debug_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *sect, void *obj)
{
int *found = (int *) obj;

View File

@ -773,7 +773,7 @@ gld${EMULATION_NAME}_handle_option (int optc)
/* Set DLLCharacteristics bits */
set_pep_name ("__dll_characteristics__", pe_dll_characteristics);
return TRUE;
}
@ -892,7 +892,7 @@ gld_${EMULATION_NAME}_after_parse (void)
"targets, did you mean --export-all-symbols?\n"));
set_entry_point ();
after_parse_default ();
}
@ -1136,7 +1136,7 @@ pr_sym (struct bfd_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
}
#endif /* DLL_SUPPORT */
static void
static void
debug_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *sect, void *obj)
{
int *found = (int *) obj;

View File

@ -43,7 +43,7 @@ static struct spu_elf_params params =
1, 0, 16, 0, 0, 2000
};
static unsigned int no_overlays = 0;
static unsigned int no_overlays = 0;
static unsigned int num_lines_set = 0;
static unsigned int line_size_set = 0;
static char *auto_overlay_file = 0;
@ -551,7 +551,7 @@ embedded_spu_file (lang_input_statement_type *entry, const char *flags)
pex_return = pex_one (PEX_SEARCH | PEX_LAST, cmd[0], (char *const *) cmd,
cmd[0], NULL, NULL, &status, &errno);
}
if (NULL != pex_return) {
if (NULL != pex_return) {
perror (pex_return);
_exit (127);
}

View File

@ -75,19 +75,19 @@ compare_output_sec_vma (const void *a, const void *b)
asection *asec = *(asection **) a, *bsec = *(asection **) b;
asection *aout = asec->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);
}

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;
}