There are 'item familiar' rules in unearthed arcana, which can be weapons, but dont have to be. Not sure if there are any other rules elsewhere though.
Races of Eberron provides rules for Weapon Familiars for Artificers. It's a special ability for Warforged Artificers, gained by taking a racial substitution level.