Changeset 97503aa5 in rtems


Ignore:
Timestamp:
Jan 5, 1999, 5:50:03 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
16a9ee1
Parents:
eb0d7ae
Message:

Patch from Chris Johns <ccj@…> to get around a C++ problem with psim.
This problem should and likely was occurring with other BSPs. This is from
Chris' email:

I had a look in the psim bsp for the older snapshot I have and it looks
like you are using the `libbsp/shared/main.c' and this is known to work.

I have just built the powerpc tools, and compiled the bsp. I have not
added the linker command file patch so got the list of linker warnings.

It looks to me like a compiler bug. The `main' call is being inlined and
when that happens the special code to call `eabi' is not being added
to the inlined version. I have attached a patch which places `main'
after `boot_card' and a call to main is now generated. I have not tested
it but it should work. I also include a dump of boot_card' and main'
showing the bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/main.c

    reb0d7ae r97503aa5  
    3030
    3131rtems_interrupt_level bsp_isr_level;
    32 
    33 int main(int argc, char **argv)
    34 {
    35 
    36   if ((argc > 0) && argv && argv[0])
    37     rtems_progname = argv[0];
    38   else
    39     rtems_progname = "RTEMS";
    40 
    41   rtems_initialize_executive_late( bsp_isr_level );
    42 
    43   return 0;
    44 }
    4532
    4633int boot_card(int argc, char **argv)
     
    10592}
    10693
     94int main(int argc, char **argv)
     95{
     96
     97  if ((argc > 0) && argv && argv[0])
     98    rtems_progname = argv[0];
     99  else
     100    rtems_progname = "RTEMS";
     101
     102  rtems_initialize_executive_late( bsp_isr_level );
     103
     104  return 0;
     105}
     106
Note: See TracChangeset for help on using the changeset viewer.