error while using Software Serial

i m trying to code attiny85 using software serial library .
I used myserial.println to transmit the value serially but it is showing m this error

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows NT (unknown)), Board: "ATtiny85 (internal 8 MHz clock)"
f:/arduino-1.0.6/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o:(.init9+0x2): relocation truncated to fit: R_AVR_13_PCREL against symbol `exit' defined in .fini9 section in f:/arduino-1.0.6/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr25\libgcc.a(_exit.o)

But when i dont use myserial.println the ide shows no error .
What should i do?

Here is a the code i used

#include <SoftwareSerial.h>
#define rxPin 0
#define txPin 1
int val=0;
//int analogInPin = 3;  
//float sensorValue = 0; 
//int finalValue=0;
#define THERMISTORPIN 3         
// resistance at 25 degrees C
#define THERMISTORNOMINAL 2252      
// temp. for nominal resistance (almost always 25 C)
#define TEMPERATURENOMINAL 25   
// how many samples to take and average, more takes longer
// but is more 'smooth'
#define NUMSAMPLES 5
// The beta coefficient of the thermistor (usually 3000-4000)
#define BCOEFFICIENT 4500
// the value of the 'other' resistor
#define SERIESRESISTOR 750   
 
int samples[NUMSAMPLES];
 

SoftwareSerial myserial(rxPin, txPin);
void setup()
{
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  myserial.begin(9600);
  //analogReference(EXTERNAL);
 
}
void loop()
{
  val=myserial.read();
  if(val>0)
   {
  int i;
  float average;
 
  // take N samples in a row, with a slight delay
  for (i=0; i< NUMSAMPLES; i++)
  {
   samples[i] = analogRead(THERMISTORPIN);
   delay(10);
  }
 
  // average all the samples out
  average = 0;
  for (i=0; i< NUMSAMPLES; i++) 
  {
     average += samples[i];
  }
  average /= NUMSAMPLES;
 
 
  average = 1023 / average - 1;
  average = SERIESRESISTOR / average;
 
 
  float steinhart=0;
  int steinhartfinal=0;
  steinhart = average / THERMISTORNOMINAL;     // (R/Ro)
  steinhart = log(steinhart);                  // ln(R/Ro)
  steinhart /= BCOEFFICIENT;                   // 1/B * ln(R/Ro)
  steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To)
  steinhart = 1.0 / steinhart;                 // Invert
  steinhart -= 273.15;  
  
 steinhartfinal=steinhart*100;
 myserial.println(steinhartfinal);
  
  delay(500);
 
 }  
}

Does SoftwareSerial work with an Attiny?

I wrote some stuff for a 1MHz version a while back and I wrote my own software serial - but that could have been because I wanted to use 1MHz to save energy.

...R

yeah the software serial library works , i checked it with the following code:

[code]
#include <SoftwareSerial.h>
#define rxPin 0
#define txPin 1
int analogInPin = 3;  // Analog input pin that the potentiometer is attached to
int sensorValue = 0;        // value read from the pot
//int outputValue = 0;        // value output to the PWM (analog out)
SoftwareSerial serial(rxPin, txPin);
void setup()
{
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  serial.begin(9600);
 // serial.println("ATtiny45 Software serial");
}
void loop()
{
 sensorValue = analogRead(analogInPin);  
     
  serial.print(sensorValue);     

  delay(2000);   
}

[/code]

The error message seems to relate to a bug in the linker.

See reply #1 in this thread: ATtiny85v Error Compiling - Microcontrollers - Arduino Forum

This is really curious. On line 73 you have the line

 myserial.println(steinhartfinal);

If you replace this single line with the following, it compiles

int blob=1;
myserial.println(blob);

but attempting to workaround this strange error with the following and the error returns

int blob=steinhartfinal;
myserial.println(blob);

And just to prove that it's that myserial.println causing the problem. When you comment it out, like this, it compiles OK.

int blob=steinhartfinal;
//myserial.println(blob);

Hackscribble:
The error message seems to relate to a bug in the linker.

See reply #1 in this thread: ATtiny85v Error Compiling - Microcontrollers - Arduino Forum

Adafruit has a version of the Arduino IDE 1.0.5 modified to get round this bug - it's needed when using their ATtiny-based Trinket.

The OP's program compiles OK for ATtiny85 under this.

Link to IDE download here: Setting up with Arduino IDE | Introducing Trinket | Adafruit Learning System

It can be unzipped into a folder of its own, so it does not overwrite existing Arduino IDE.

Doesn't explain exactly why the problem is happening with the Arduino version of the linker.