*** empty log message ***
This commit is contained in:
parent
eb2022d7dd
commit
48491e2e15
3 changed files with 54 additions and 46 deletions
18
ld/ldlang.c
18
ld/ldlang.c
|
@ -107,7 +107,7 @@ static void
|
||||||
DEFUN(print_alignment,(value),
|
DEFUN(print_alignment,(value),
|
||||||
unsigned int value)
|
unsigned int value)
|
||||||
{
|
{
|
||||||
printf("2**%2u",value);
|
printf("2**%1u",value);
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
DEFUN(print_fill,(value),
|
DEFUN(print_fill,(value),
|
||||||
|
@ -449,8 +449,11 @@ DEFUN(lang_map,(outfile),
|
||||||
{
|
{
|
||||||
lang_memory_region_type *m;
|
lang_memory_region_type *m;
|
||||||
fprintf(outfile,"**MEMORY CONFIGURATION**\n\n");
|
fprintf(outfile,"**MEMORY CONFIGURATION**\n\n");
|
||||||
|
#ifdef HOST_64_BIT
|
||||||
fprintf(outfile,"name\t\torigin\t\tlength\t\tattributes\n");
|
fprintf(outfile,"name\t\torigin\t\tlength\t\tattributes\n");
|
||||||
|
#else
|
||||||
|
fprintf(outfile,"name\t\torigin length\t\tattributes\n");
|
||||||
|
#endif
|
||||||
for (m = lang_memory_region_list;
|
for (m = lang_memory_region_list;
|
||||||
m != (lang_memory_region_type *)NULL;
|
m != (lang_memory_region_type *)NULL;
|
||||||
m = m->next)
|
m = m->next)
|
||||||
|
@ -464,8 +467,8 @@ DEFUN(lang_map,(outfile),
|
||||||
fprintf(outfile,"\n");
|
fprintf(outfile,"\n");
|
||||||
}
|
}
|
||||||
fprintf(outfile,"\n\n**LINK EDITOR MEMORY MAP**\n\n");
|
fprintf(outfile,"\n\n**LINK EDITOR MEMORY MAP**\n\n");
|
||||||
fprintf(outfile,"output\t\tinput\t\tvirtual\n");
|
fprintf(outfile,"output input virtual\n");
|
||||||
fprintf(outfile,"section\t\tsection\t\taddress\tsize\n\n");
|
fprintf(outfile,"section section address tsize\n\n");
|
||||||
|
|
||||||
print_statements();
|
print_statements();
|
||||||
|
|
||||||
|
@ -864,6 +867,10 @@ DEFUN(map_input_to_output_sections,(s, target, output_section_statement),
|
||||||
lang_output_section_statement_lookup
|
lang_output_section_statement_lookup
|
||||||
(s->address_statement.section_name);
|
(s->address_statement.section_name);
|
||||||
os->addr_tree = s->address_statement.address;
|
os->addr_tree = s->address_statement.address;
|
||||||
|
if (os->bfd_section == (asection *)NULL) {
|
||||||
|
info("%P%F can't set the address of undefined section %s\n",
|
||||||
|
s->address_statement.section_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case lang_input_statement_enum:
|
case lang_input_statement_enum:
|
||||||
|
@ -997,7 +1004,7 @@ DEFUN(print_input_section,(in),
|
||||||
else {
|
else {
|
||||||
printf("%s", abfd->filename);
|
printf("%s", abfd->filename);
|
||||||
}
|
}
|
||||||
printf("(%d bytes)", (int)bfd_alloc_size(abfd));
|
printf("(overhead %d bytes)", (int)bfd_alloc_size(abfd));
|
||||||
print_nl();
|
print_nl();
|
||||||
|
|
||||||
/* Find all the symbols in this file defined in this section */
|
/* Find all the symbols in this file defined in this section */
|
||||||
|
@ -1090,6 +1097,7 @@ DEFUN(print_wild_statement,(w,os),
|
||||||
lang_wild_statement_type *w AND
|
lang_wild_statement_type *w AND
|
||||||
lang_output_section_statement_type *os)
|
lang_output_section_statement_type *os)
|
||||||
{
|
{
|
||||||
|
printf(" from ");
|
||||||
if (w->filename != (char *)NULL) {
|
if (w->filename != (char *)NULL) {
|
||||||
printf("%s",w->filename);
|
printf("%s",w->filename);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include "ld.h"
|
#include "ld.h"
|
||||||
#include "ldexp.h"
|
#include "ldexp.h"
|
||||||
#include "ldgram.tab.h"
|
#include "ldgramtb.h"
|
||||||
#include "ldmisc.h"
|
#include "ldmisc.h"
|
||||||
|
|
||||||
#undef input
|
#undef input
|
||||||
|
@ -317,6 +317,10 @@ WHITE [ \t]+
|
||||||
yylval.name = ".bss";
|
yylval.name = ".bss";
|
||||||
return OPTION_Texp;
|
return OPTION_Texp;
|
||||||
}
|
}
|
||||||
|
"\ -O"{FILENAME} {
|
||||||
|
yylval.name = buystring(yytext+3);
|
||||||
|
return OPTION_Texp;
|
||||||
|
}
|
||||||
|
|
||||||
"\ -T"{FILENAME} {
|
"\ -T"{FILENAME} {
|
||||||
yylval.name = buystring(yytext+3);
|
yylval.name = buystring(yytext+3);
|
||||||
|
|
24
ld/ldsym.c
24
ld/ldsym.c
|
@ -169,8 +169,7 @@ static void
|
||||||
print_file_stuff(f)
|
print_file_stuff(f)
|
||||||
lang_input_statement_type *f;
|
lang_input_statement_type *f;
|
||||||
{
|
{
|
||||||
fprintf (stdout, " %s", f->filename);
|
fprintf (stdout, " %s\n", f->filename);
|
||||||
fprintf (stdout, " ");
|
|
||||||
if (f->just_syms_flag)
|
if (f->just_syms_flag)
|
||||||
{
|
{
|
||||||
fprintf (stdout, " symbols only\n");
|
fprintf (stdout, " symbols only\n");
|
||||||
|
@ -198,16 +197,18 @@ lang_input_statement_type *f;
|
||||||
printf("hex \n");
|
printf("hex \n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fprintf (stdout, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ldsym_print_symbol_table ()
|
ldsym_print_symbol_table ()
|
||||||
{
|
{
|
||||||
fprintf (stdout, "\nFiles:\n\n");
|
fprintf (stdout, "**FILES**\n\n");
|
||||||
|
|
||||||
lang_for_each_file(print_file_stuff);
|
lang_for_each_file(print_file_stuff);
|
||||||
|
|
||||||
fprintf (stdout, "\nGlobal symbols:\n\n");
|
fprintf(stdout, "**GLOBAL SYMBOLS**\n\n");
|
||||||
|
fprintf(stdout, "offset section offset symbol\n");
|
||||||
{
|
{
|
||||||
register ldsym_type *sp;
|
register ldsym_type *sp;
|
||||||
|
|
||||||
|
@ -220,11 +221,11 @@ ldsym_print_symbol_table ()
|
||||||
print_address(defsym->value);
|
print_address(defsym->value);
|
||||||
if (defsec)
|
if (defsec)
|
||||||
{
|
{
|
||||||
print_space();
|
printf(" %-10s",
|
||||||
print_address(defsym->value+defsec->vma);
|
|
||||||
printf("%7s",
|
|
||||||
bfd_section_name(output_bfd,
|
bfd_section_name(output_bfd,
|
||||||
defsec));
|
defsec));
|
||||||
|
print_space();
|
||||||
|
print_address(defsym->value+defsec->vma);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -233,19 +234,14 @@ ldsym_print_symbol_table ()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
printf("undefined");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (sp->scoms_chain) {
|
if (sp->scoms_chain) {
|
||||||
printf(" common size ");
|
printf("common ");
|
||||||
print_address((*(sp->scoms_chain))->value);
|
print_address((*(sp->scoms_chain))->value);
|
||||||
printf(" %s ",sp->name);
|
printf(" %s ",sp->name);
|
||||||
}
|
}
|
||||||
if (sp->sdefs_chain) {
|
else if (sp->sdefs_chain) {
|
||||||
printf(" symbol def ");
|
|
||||||
print_address((*(sp->sdefs_chain))->value);
|
|
||||||
printf(" %s ",sp->name);
|
printf(" %s ",sp->name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue